我正在尝试访问由我的测试代码打开的第二个窗口:
.click('.footer-content li:nth-child(thisItem)')
.toWindow('http://thisDomain.com')
.assert.title().to.contain(thisTitle)
.toParentWindow()我可以在浏览器中看到打开的正确页面,但测试仍然返回原始页面的标题。我是否正确地使用了.toWindow?
发布于 2014-05-29 23:49:59
您需要将窗口的名称传递给它,请参见:https://developer.mozilla.org/en-US/docs/Web/API/Window.name
https://stackoverflow.com/questions/23814119
复制相似问题