WebDriver driver;
String baseUrl = "http://example.com";
@BeforeClass
public void beforeClass() {
System.setProperty("webdriver.firefox.marionette","local path to geckodriver-v0.10.0-win64");
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
driver = new FirefoxDriver();
}
@Test
public void login() throws InterruptedException {
driver.get(baseUrl);
Thread.sleep(3000);
}
@AfterClass
public void afterClass() {
}
这段代码我试图使用TestNG工具运行,但它失败了。
将它用作Java应用程序时运行完美但我想将此脚本作为TestNG
脚本运行