我在FireFox中使用Selenium IDE。檢查頁面上的文字Selenium
我想編寫一個IF語句,它將搜索頁面上的所有文本(),如果它找到匹配的文本回聲「找到它」,否則回顯「未找到」。
在那裏我有這麼遠:
*somehow search here hopefully Stackoverflow save the day*
store | FOUND IT | found
store | NOT FOUND | notfound
if | ${test}==true |
echo | ${found} |
else | |
echo | ${notfound} |
endIf | |
請不要不給我的JavaScript代碼等等,我使用Firefox的插件IDE。
謝謝!
這是http://stackoverflow.com/questions/14974508/webdriverhow-to-find-if-text-exists-on-page –
@JosephEvans的可能重複這並不使用'硒IDE' – RemcoW
讓我們開始說,我不知道如何編寫'Selnium IDE'的腳本。我知道在插件中有一個選項'assertBodyText(pattern)'。這將檢查傳入的'pattern'是否在頁面源代碼中,這似乎正是你想要的。 – RemcoW