首页 > 解决方案 > Robotframework:ValueError:元素定位器'locator(332,400)'不匹配任何元素

问题描述

我正在尝试设置自动测试。我正在使用 RobotFramework 和 AppiumLibrary 我正在使用点击一个按钮时点击一个点,因为我在我的应用程序上使用了 Flutter。当我尝试在以下位置输入文本时:

http://serhatbolsu.github.io/robotframework-appiumlibrary/AppiumLibrary.html

说我必须使用定位器,文本但是当我尝试将定位器与我的坐标一起使用时

click a point          332      400
sleep                  2s
input text             locator(332,400)     testing

然后出现此通知

ValueError: Element locator 'locator(332,400)' did not match any elements.

我已经在谷歌上搜索了,找不到答案,请帮助我,谢谢

标签: appiumrobotframework

解决方案


使用来自其定位器介绍的有效定位器 http://serhatbolsu.github.io/robotframework-appiumlibrary/AppiumLibrary.html#Introduction 在此处输入图像描述

即:输入文本id=my_element TextToInput


推荐阅读