0
我試圖訪問我的測試代碼,打開第二窗口:在DalekJS使用.toWindow的
.click('.footer-content li:nth-child(thisItem)')
.toWindow('http://thisDomain.com')
.assert.title().to.contain(thisTitle)
.toParentWindow()
我可以看到正確的頁面在瀏覽器中打開,但測試仍返回標題原始頁面。我是否正確使用.toWindow?
1.是否有一個窗口指定名稱。點擊聲明的方式? 包含一個target =「_ blank」參數。 2.有沒有辦法從標籤中捕獲URL,然後使用新的.open語句?像var myLink =('.footer-content li:nth-child(7)a [href]')和.open(myLink)?最終我會將其擴展爲對所有li項目的for循環。 – hildtfw