我正在自动化Web应用程序。我想运行并行的方法,所以,像已经写代码:为什么不使用主要方法之后的方法?
public class test{
public static WebDriver driver;
public static void main(String args[])
{
driver = new FirefoxDriver();
}
public static void Login()
{
driver.get("www.example.com");
driver.findElement(By.id("uname")).sendKeys("test");
driver.findElement(By.id("pass")).sendKeys("test");
}
}
当我运行程序时,它只是打开浏览器,然后什么都没有。为什么不进入Login方法?
我明白了。简单但我不知道。非常感谢.. :) –
@HelpingHands,如果您是webdriver/java的新手,我会建议您在此处查看 - http://www.toolsqa.com/selenium-webdriver/testng-testcase/ – vins
Sure ..我会看看.. –