1.在运行时报错:“ java.lang.Exception: Test class should have exactly one public zero-argument constructor ”。
解决方法:class上忘了加“@RunWith(value=Parameterized.class)”
2.报错:"java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property"
解决方法:在WebDriver driver = new FirefoxDriver();前面加上 System.setProperty("webdriver.firefox.marionette","F:\\ckx\\geckodriver\\geckodriver.exe");
3.报错:“Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.”------无法启动新的会话。可能的原因是远程服务器或浏览器启动失败的无效地址。
解决方法:把地址“http://www.baidu.com”改成“https://www.baidu.com”