find_element给出' dict'对象没有属性' click'使用WinAppDriver测试Windows桌面应用程序时出错
我是Winappdriver和Python的新手,我正在尝试使用Python中的WinapPdriver自动化Windows桌面应用程序。当我尝试使用find_element()查找元素时,它返回字典而不是元素。因此,我无法在任何元素上执行.click(),.send_keys()。我尝试在线查找解决方案,大多数解决方案都建议降级硒并最新的Chromedriver。我尝试将我的硒从4.1.3降至3.141,但仍然有同样的错误。我的Chromedriver已经是最新的。这是使用WinappDriver的桌面自动化,因此我不确定降低硒有多有帮助。我相信这些解决方案用于Web应用程序测试。有人可以帮忙研究吗?谢谢你!
请检查以下信息以获取工具版本
- Python 3.10
- Selenium 4.1.3 [检查降级有相同的错误]
- Appium-Python-client 2.2.0 [检查的降级有相同的错误]
- WinAppDriver 1.2.1
I am new to WinAppDriver and Python and I am trying to automate a windows Desktop application using WinAppDriver in Python. When I try to find an element using find_element(), it returns dictionary rather than an element. And because of that I am unable to perform .click(), .send_keys() on any element. I tried looking up solution online and most of the solutions are suggesting to downgrade selenium and have a up to date ChromeDriver. I tried downgrading my selenium from 4.1.3 to 3.141, but I still got the same error. My ChromeDriver is already up to date. This is a Desktop automation which is using WinAppDriver, so I am not sure how downgrading selenium would help. I believe those solutions are for web application tests. Can someone please help look into it? Thank you!
Please check below information for tools versions
- Python 3.10
- Selenium 4.1.3 [Checked downgrading got same error]
- Appium-Python-Client 2.2.0 [Checked downgrading got same error]
- WinAppDriver 1.2.1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了解决方案,该解决方案是通过运行:
source
I found the solution, which is to revert Selenium to 3.141.0 by running:
Source