以下是与我的流程相关的详细信息-
页面-1-登录网页
登录后,出现URL(将其称为元素1)
单击元素1之后,网页将再次加载,并且我需要单击其他元素(将其称为元素2)。
问题-
驱动程序被卡住,或者没有单击元素1,或者在添加足够的等待后被单击,但是现在驱动程序被卡在这个流程中,您可以从下面的代码中观察到,一旦clickurl.click()被调用,然后在10秒钟后我应该收到一条消息“
睡眠已完成。现在返回到调用类 ”
但是我得到了例外。
代码-
clickurl = d1.findElement(By.xpath("XPath for Element 1"));
if ( clickurl != null ) {
System.out.print("****** Clicking on it Directly ");
clickurl.click();
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.print("****** Sleep Completed.. Now we return to calling class ");`
系统详细资料-
InternetExplorerDriver服务器(64位)3.14.0.0
操作系统名称:“ Windows 10”
Java版本:“ 1.8.0_191”
其他详情 -
请注意,单击元素1后,我使用 driver.switchTo().defaultContent();
错误详情 -
Dec 11, 2018 5:02:56 PM org.openqa.selenium.remote.ErrorCodes toStatus
INFO: HTTP Status: '500' -> incorrect JSON status mapping for 'timeout' (408 expected)
Exception in thread "main" org.openqa.selenium.TimeoutException: Timed out waiting for page to load.