호구인생
|
total
today
yesterday
홈
태그
미디어로그
위치로그
방명록
카테고리
분류 전체보기
팁&테크
카페24
티스토리
맥북
노트5
윈도우10
프로그램
PHP
C#
Android
Arduino
JAVA
selenium
Javascript
CSS
일상
여행
고양이
매일
온라인마케팅
요리
반찬
한식
일반상식
각종서식
학업
운영체제
centos
유틸
HeidiSQL
DB
Mysql
크리에이터
팁&테크
시집
플로리스트
하루하루
티스토리가입하기
C#기본예제
프로그램/selenium
2016. 10. 19. 23:39
Posted by 윤호구
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using OpenQA.Selenium; using OpenQA.Selenium.Chrome; using OpenQA.Selenium.Support.UI; namespace kinautoupload { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { using (IWebDriver driver = new ChromeDriver()) { //Notice navigation is slightly different than the Java version //This is because 'get' is a keyword in C# driver.Navigate().GoToUrl("http://www.google.com/"); // Find the text input element by its name IWebElement query = driver.FindElement(By.Name("q")); // Enter something to search for query.SendKeys("Cheese"); // Now submit the form. WebDriver will find the form for us from the element query.Submit(); // Google's search is rendered dynamically with JavaScript. // Wait for the page to load, timeout after 10 seconds var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); wait.Until(d => d.Title.StartsWith("cheese", StringComparison.OrdinalIgnoreCase)); // Should see: "Cheese - Google Search" (for an English locale) Console.WriteLine("Page title is: " + driver.Title); } } } }
공유하기
게시글 관리
호구인생
저작자표시
1일1포 하라 호구가 되지 않기 위해 오늘도 노력하자
윤호구
tag cloud
팁앤테크
결국은 게임용
즐겨찾기등록
업데이트끄기
자바
java path
티스토뢰
윈도우10
안드로이드스튜디오
MySQL
윈도우10팁
네이버웹마스터도구
윈도우10업데이트끄기
앱플레이어
영상자막합치기
중복데이터
이번주 월요일
excel테두리
php
네이버사이트등록
들바람꽃
str_pad
안드로이드
자카스크립트
단축키
스타일펜
마리친구
노트5
스포카한산스
자바패쓰
공지사항
최근댓글
최근기사
글보관함
링크
2025
5
«
»
«
2025/5
»
일
월
화
수
목
금
토
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
티스토리툴바