Android - Error when trying to use sendKey or clear function on WebElement obtained with driver.findElement(new AppiumBy.ByAndroidViewTag("myTag"));
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
先使用 AppiumBy.ByAndroidViewTag("myTag") 重現回報的 AndroidDriver 情況,然後比較同一個 WebElement 上的 click()、sendKeys("test") 和 clear()。使用 InvalidElementStateException 堆疊追蹤和 sendKeysToElement 命令縮小故障範圍;當回報的操作能夠正常運作,或限制已獲得明確記錄時,即視為完成。
由索引模型根據 Issue 內容生成。
描述
Hello,
I get an error when i try to use sendKey or clear functions on WebElement obtained with driver.findElement(new AppiumBy.ByAndroidViewTag("myTag"));
WebElement network = driver.findElement(new AppiumBy.ByAndroidViewTag("myTag")); => ok, no error
network.click(); => ok, no error
network.sendKeys("test"); or network.clear(); => not ok, i get an error
=> Stack trace
Exception in thread "main" org.openqa.selenium.InvalidElementStateException: Could not perform sendKeys/setValueImmediate action on the element 0e3f8f3e-5e28-414b-93f0-0809452d52f2
Build info: version: '4.21.0', revision: '79ed462ef4'
System info: os.name: 'Mac OS X', os.arch: 'aarch64', os.version: '14.1.1', java.version: '22.0.1'
Driver info: io.appium.java_client.android.AndroidDriver
Command: [ac783605-bf94-4b80-b61f-ce1b09aae574, sendKeysToElement {id=0e3f8f3e-5e28-414b-93f0-0809452d52f2, value=[Ljava.lang.CharSequence;@3b77a04f}]
Element: [[AndroidDriver: on ANDROID (ac783605-bf94-4b80-b61f-ce1b09aae574)] -> -android viewtag: myTag]
Session ID: ac783605-bf94-4b80-b61f-ce1b09aae574
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
at org.openqa.selenium.remote.ErrorCodec.decode(ErrorCodec.java:167)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:138)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:50)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:190)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:237)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:518)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:223)
at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:110)
Process finished with exit code 1
Please help,
Thanks and Regards
- 主要語言
- Java
- 星號
- 1.3k
- 分支
- 755
- 平均合併
- 5 天 14 小時
- 30 天內合併 PR
- 8
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
appium/java-client 的其他 Issue
-
難度 5/5 一週以上 新手友好度 25/100
appium/java-client#2426 ·
維護者通常 1 天內回覆
-
bug
難度 4/5 3-5 天 新手友好度 50/100
appium/java-client#2372 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 30/100
appium/java-client#2368 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 30/100
appium/java-client#2341 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 15/100
appium/java-client#2323 ·
維護者通常 1 天內回覆
查看 appium/java-client 的全部 Issue
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
openhab/openhab-core#5847 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
-
bug
難度 2/5 1-3 小時 新手友好度 76/100
-
難度 2/5 1-3 小時 新手友好度 88/100
apache/parquet-java#3820 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
beehive-lab/jllm#187 ·