0
は私がwebdriverをセレン
途中のJava、セレンを使用して、私が使用して新たなんだ:セレン3ベータ3、のJava jdk1.8.0_101とFirefox 48.01 また、私はGeckodriver使用しますそれはsel3を扱うために必要となるからです。
私はURLを開こうとしています。ブラウザを開くと動作しています。 私が使用するコードは以下の通りです。
package AutomatedScripts;
import org.openqa.selenium.WebDriver; // driver for Webdriver
import org.openqa.selenium.firefox.FirefoxDriver; //driver for Firefox
public class GoogleSearchOneTime {
public static void main(String[] agrs) {
System.setProperty("webdriver.firefox.marionette","C:\\selenium-3.0.0\\geckodriver\\geckodriver.exe");
// Launch a firefox browser
WebDriver driver = new FirefoxDriver();
// go to Google.com
driver.get("http://www.google.com");
// go to google.com
// driver.navigate().to("http://www.google.com");
//Enter search terms
//driver.findElement(By.id("lst-ib")).clear();
//driver.findElement(By.id("lst-ib")).sendKeys("Google");
//Click on the searh button
//driver.findElement(By.name("btnG")).click();
//check page title contacts the search term
}
}