2
您好,我需要在我的測試中點擊網頁視圖。按鈕webView的代碼下面的代碼:意式濃縮咖啡點擊webView按鈕
<input type="submit" onclick="ignoreClose()" name="UsernamePasswordEntry" value="Submit">
我試圖處理它這樣:
onWebView().withElement(findElement(Locator.NAME, "UsernamePasswordEntry")).perform(webClick());
,但我得到:
java.lang.RuntimeException: java.lang.RuntimeException: Atom evaluation returned null!
有什麼辦法處理呢?
你與其他一些屬性,嘗試,如HTML標籤的ID? – Yashasvi
問題是由於按鈕不在我的網站代碼內部,而是在無法訪問Espresso的iframe中。我仍然沒有想出如何點擊webView中顯示的部分網站,這是從少數iframe創建的。 – F1sher