A page I am testing has a button that takes you to a different page on the same site.
(我正在测试的页面上有一个按钮,可将您带到同一站点上的其他页面。)
After clicking on that button, I want to wait for that page to load before continuing. (单击该按钮后,我要等待该页面加载后才能继续。)
Normally, I would just wait for some element on that page to load, but since I recently updated nightwatch/selenium, that waitForElementPresent() test has stopped working. (通常,我只是等待该页面上的某些元素加载,但是由于我最近更新了守夜/硒,因此waitForElementPresent()测试已停止工作。)
In the process of debugging the problem, I thought it made sense to wait for the new URL to load, but I don't see a nightwatch way to do that. (在调试问题的过程中,我认为等待新URL加载是很有意义的,但是我看不到有守夜的方法。)
I can hard code a wait with a pause() followed by an assert.urlContains(), but there's got to be a better way. (我可以在pause()后加上assert.urlContains()来硬编码等待,但是必须有一种更好的方法。)
Any suggestions? (有什么建议么?)
What used to work:
(工作原理:)
this.waitForElementVisible(runCSS,3000)
.click(runCSS)
.waitForElementPresent(newPageElementCSS,5000)
but now it times out on the second wait, even though I can clearly see the new page on the browser display (Firefox 45.0.1 on Windows 8.1).
(但是现在,即使我可以在浏览器显示屏上清楚地看到新页面(Windows 8.1上的Firefox 45.0.1),它也会在第二次等待时超时。)
ask by Bryn Wolfe translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…