我試圖根據頁面中元素的可用性來獲取布爾值。當出現在頁面中的元素,我可以能夠得到真,但如果該元素不存在,提示以下錯誤信息:無法使用cucumberjs驗證頁面中的元素可用性
browser.findElement(by.className('Welcome')).isDisplayed()
browser.findElement(by.className('Welcome')).isPresent()
element(by.className('Welcome')).isDisplayed()
element(by.className('Welcome')).isPresent()
請張貼有關HTML – Gunderson
顯示爲<按鈕類=「歡迎」的元件細節>。 – KAK