我是新来硒和自动化测试,我面临着以下错误信息:超时无效指定类型:网页加载
org.openqa.selenium.InvalidArgumentException: Invalid timeout type specified: page load
当运行测试/登录/用户和传球是有类型极其缓慢 - 每10-15秒钟一个符号。我能够登录,但测试失败,提到的错误信息。 我该如何解决它,让测试运行得更快一点,我认为是问题所在?
的Windows 10 IE 11 即驾驶员32位3.5.0
,代码:
@Before
public void setUp() throws Exception {
System.setProperty("webdriver.ie.driver", "D:\\Documents\\SeleniumDriver\\IEDriverServer.exe");
this.driver = new InternetExplorerDriver();
this.driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(4000, TimeUnit.MINUTES);
driver.get(Constant.URL);
ExcelUtils.setExcelFile(Constant.Path_TestData + Constant.File_TestData, "Sheet1");
}
@SuppressWarnings("deprecation")
@Test
public void Activation() throws Exception {
LoginModel.LoginAdminCredentials(driver);
driver.manage().timeouts().pageLoadTimeout(4000, TimeUnit.MINUTES);
String currentURL = driver.getCurrentUrl();
Assert.assertEquals("expectedURL", currentURL);
}
可能摆脱driver.manage的'( ).timeouts()。pageLoadTimeout(4000,TimeUnit.MINUTES);'在测试 – nullpointer
感谢它的工作原理和错误不可见。即使那个测试仍然运行得太慢。任何想法如何解决速度问题? – evitta15