当前位置: 首页 > 知识库问答 >
问题:

Appium在点击Android设备/模拟器上的可见下拉项时抛出错误

龙俭
2023-03-14

你好Appium开发者,

我有一个问题,而点击可见的下拉项目,请找到下面的详细信息来复制问题

自动执行以下步骤:-

  1. 点击下拉图像以列出项目。--这里的录音效果很好

注意:-我尝试过点击,轻弹等,但所有事件显示appium错误。

有人能分享你对此的想法吗??我错过了什么吗......

非常感谢您的意见。。。。。。。

网址:-http://jsfiddle.net/jqwidgets/Pk7SP/

代码段:-

WebElement element=driver.findElement(By.xpath("//td[contains(text(),'Nancy Davolio')]"));
 new TouchActions(driver).singleTap(element).perform();

Appium日志:-

debug: Appium request initiated at /wd/hub/session/9f30590c753d7d2f7c7262f7b6d13
769/touch/click
debug: Request received with params: {"element":"0.4438802069053054-1"}
debug: Proxying command to 127.0.0.1:9515
info: Making http request with opts: {"url":"http://127.0.0.1:9515/wd/hub/sessio
n/9f30590c753d7d2f7c7262f7b6d13769/touch/click","method":"POST","json":{"element
":"0.4438802069053054-1"}}
debug: Proxied response received with status 200: {"sessionId":"9f30590c753d7d2f
7c7262f7b6d13769","status":0,"value":null}
POST /wd/hub/session/9f30590c753d7d2f7c7262f7b6d13769/touch/click 200 588ms - 85
b
debug: Appium request initiated at /wd/hub/session/9f30590c753d7d2f7c7262f7b6d13
769/element
debug: Request received with params: {"using":"xpath","value":".//*[@id='dropdow
nlistContentcombobox']/input"}
debug: Proxying command to 127.0.0.1:9515
info: Making http request with opts: {"url":"http://127.0.0.1:9515/wd/hub/sessio
n/9f30590c753d7d2f7c7262f7b6d13769/element","method":"POST","json":{"using":"xpa
th","value":".//*[@id='dropdownlistContentcombobox']/input"}}
debug: Proxied response received with status 200: {"sessionId":"9f30590c753d7d2f
7c7262f7b6d13769","status":0,"value":{"ELEMENT":"0.4438802069053054-2"}}
POST /wd/hub/session/9f30590c753d7d2f7c7262f7b6d13769/element 200 182ms - 124b
debug: Appium request initiated at /wd/hub/session/9f30590c753d7d2f7c7262f7b6d13
769/element/0.4438802069053054-2/click
debug: Request received with params: {"id":"0.4438802069053054-2"}
debug: Proxying command to 127.0.0.1:9515
info: Making http request with opts: {"url":"http://127.0.0.1:9515/wd/hub/sessio
n/9f30590c753d7d2f7c7262f7b6d13769/element/0.4438802069053054-2/click","method":
"POST","json":{"id":"0.4438802069053054-2"}}
debug: Proxied response received with status 200: {"sessionId":"9f30590c753d7d2f
7c7262f7b6d13769","status":0,"value":null}
POST /wd/hub/session/9f30590c753d7d2f7c7262f7b6d13769/element/0.4438802069053054
-2/click 200 435ms - 85b
debug: Appium request initiated at /wd/hub/session/9f30590c753d7d2f7c7262f7b6d13
769/element
debug: Request received with params: {"using":"xpath","value":"//td[contains(tex
t(),'Nancy Davolio')]"}
debug: Proxying command to 127.0.0.1:9515
info: Making http request with opts: {"url":"http://127.0.0.1:9515/wd/hub/sessio
n/9f30590c753d7d2f7c7262f7b6d13769/element","method":"POST","json":{"using":"xpa
th","value":"//td[contains(text(),'Nancy Davolio')]"}}
debug: Proxied response received with status 200: {"sessionId":"9f30590c753d7d2f
7c7262f7b6d13769","status":0,"value":{"ELEMENT":"0.4438802069053054-3"}}
POST /wd/hub/session/9f30590c753d7d2f7c7262f7b6d13769/element 200 118ms - 124b
debug: Appium request initiated at /wd/hub/session/9f30590c753d7d2f7c7262f7b6d13
769/touch/click
debug: Request received with params: {"element":"0.4438802069053054-3"}
debug: Proxying command to 127.0.0.1:9515
info: Making http request with opts: {"url":"http://127.0.0.1:9515/wd/hub/sessio
n/9f30590c753d7d2f7c7262f7b6d13769/touch/click","method":"POST","json":{"element
":"0.4438802069053054-3"}}
info: Responding to client with error: {"status":13,"value":{"message":"An unkno
wn server-side error occurred while processing the command.","origValue":"unknow
n error: Element is not clickable at point (89, 51). Other element would receive
 the click: <div class=\"overlay\" style=\"z-index: 99; -webkit-appearance: none
; background-color: black; opacity: 0.01; outline: none; border: none; padding:
0px; overflow: hidden; margin: 0px; left: 0px; top: 0px; position: absolute; wid
th: 256px; height: 198px; background-position: initial initial; background-repea
t: initial initial;\"></div>\n  (Session info: chrome=34.0.1847.114)\n  (Driver
info: chromedriver=2.9.248315,platform=Windows NT 6.1 SP1 x86_64)"},"sessionId":
"9f30590c753d7d2f7c7262f7b6d13769"}
POST /wd/hub/session/9f30590c753d7d2f7c7262f7b6d13769/touch/click 500 219ms - 74
4b

共有1个答案

夹谷腾
2023-03-14

未知错误:元素在点(89,51)处不可单击。其他元素将收到单击:

从日志中可以看出,当点击元素时,一些加载程序类型的东西在运行,而appium试图在加载程序仍在加载东西时点击元素。因此,您可以通过Thread.sleep等待一段时间,或者放置一些逻辑等待

 类似资料:
  • 问题内容: 这是我现在正在使用我的Android应用程序处理的问题。程序在模拟器上运行正常,没有任何错误,但在运行相同操作系统的真实设备上却出现了错误。 我有一个应用程序小部件更新服务,可以更新我的小部件。此服务检查窗口小部件是否在屏幕上,否则不进行更新过程。在模拟器上工作正常。 每次必须在OnReceive方法中更新窗口小部件时,我都会在字符串变量check_intent中捕获该意图,该变量告诉

  • 朋友们试图在ios实际设备上运行appium脚本,出现以下错误 Eclipse错误: [TestNG]正在运行: /private/var/folders/05/79kfthm94qjd3bngd2l5pv7r0mx69v/T/testng-eclipse--1690789728/testng-customsuite.xml 配置失败:@BeforeClass setUpBeforeClass o

  • 在尝试运行创建的Android项目时,我得到以下错误,并且项目没有在模拟器上启动,即使模拟器成功启动。 错误:

  • 我两天前更新了一些android studio组件,一切都搞砸了。现在我不能使用android模拟器,因为它一吃午饭就立即退出。 我已经尝试了以下方法: 删除所有虚拟设备并创建新设备-不起作用。 擦除模拟器数据-不起作用。 尝试在AVD中手动午餐模拟器-不起作用 立即使用冷引导选项启动模拟器。-模拟器显示此消息冷引导:用户请求并退出。 卸载Android Studio并删除整个SDK文件夹并下载所

  • 我正在尝试制作一个简单的GPS应用程序,因此我想在我的设备模拟器上进行检查。 因此,我通过工具在android studio中启用ADB集成 然后,我按绿色箭头运行我的应用程序,它在模拟器上启动,但由于某种原因,在设备监视器模拟器中,所有选项都被禁用,如下图所示: 所有选项都被禁用 任何想法,以便我可以改变坐标?

  • 在Android模拟器中使用debug时,我得到错误: 但当使用电话时,没有问题。我使用了clean project和rebuild project,但没有工作