2013-11-03 11 views
0

獲取geb點擊登錄按鈕後,我想等待下一頁加載。下一頁包含以下內容:waitFor標準來檢查div的innerHTML中是否存在匹配的文本?

<th class="header"> 
    <div align="center">Welcome</div> 
</th> 

沒有任何其他內容允許我測試已加載的頁面。

我的waitFor表達式應該是什麼樣子?

$("input", value:"Login").click() // login action 

// now wait for next page to load: 
waitFor{ /* ?? */ } // <-- how to locate the 'Welcome' text in /th/div/ 

非常感謝!

+0

這工作:'WAITFOR(10){$( 「格」,文: '歡迎')}' –

回答

1

我想這應該是waitFor{ $("div", text: "Welcome") }

+0

是的,我也確實有它與這方面的工作,但沒沒有意識到,因爲下一行沒有正常開火!非常感謝。 –

相關問題