9. using System;
using OpenQA.Selenium.IE;
using OpenQA.Selenium;
class Program {
static void Main(string[] args) {
IWebDriver driver = new InternetExplorerDriver();
Console.ReadKey();
driver.Quit();
}
}
とりあえず、ブラウザ起動してみる
10. using System;
using OpenQA.Selenium.IE;
using OpenQA.Selenium;
class Program {
static void Main(string[] args) {
IWebDriver driver = new InternetExplorerDriver();
driver.Navigate().GoToUrl("http://www.bing.com");
Console.WriteLine(driver.Title);
Console.ReadKey();
driver.Quit();
}
}
Bing にいってみる
13. using System;
using OpenQA.Selenium.IE;
using OpenQA.Selenium;
class Program {
static void Main(string[] args) {
IWebDriver driver = new InternetExplorerDriver();
driver.Navigate().GoToUrl("http://www.bing.com");
IWebElement element = driver.FindElement(By.Name("q"));
element.SendKeys("セレニウム ウェブドライバー");
Console.ReadKey();
driver.Quit();
}
}
テキストボックスに文字を入力