【发布时间】:2020-05-15 23:37:33
【问题描述】:
我正在尝试设置自动测试。我正在使用 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.
我已经在谷歌上搜索了,但找不到答案,请帮助我,谢谢
【问题讨论】:
-
你可以试试用 xpath 代替这个吗?
-
我尝试使用 xpath 并发生这种情况 ValueError: Element locator '/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.View/android.view .View/android.view.View/android.widget.ImageView/android.widg et.EditText[1]' 没有匹配任何元素。
-
你用什么工具来检查?我认为你添加了错误的 xpath
-
我用的是Appium先生,我在Selected Element上发现,文本框有xpath
-
我使用“在坐标处单击元素”,它似乎工作得很好。你可以试试吗?
标签: appium robotframework