find_element给出' dict'对象没有属性' click'使用WinAppDriver测试Windows桌面应用程序时出错

发布于 2025-01-24 18:15:23 字数 612 浏览 5 评论 0原文

我是Winappdriver和Python的新手,我正在尝试使用Python中的WinapPdriver自动化Windows桌面应用程序。当我尝试使用find_element()查找元素时,它返回字典而不是元素。因此,我无法在任何元素上执行.click(),.send_keys()。我尝试在线查找解决方案,大多数解决方案都建议降级硒并最新的Chromedriver。我尝试将我的硒从4.1.3降至3.141,但仍然有同样的错误。我的Chromedriver已经是最新的。这是使用WinappDriver的桌面自动化,因此我不确定降低硒有多有帮助。我相信这些解决方案用于Web应用程序测试。有人可以帮忙研究吗?谢谢你!

请检查以下信息以获取工具版本

  1. Python 3.10
  2. Selenium 4.1.3 [检查降级有相同的错误]
  3. Appium-Python-client 2.2.0 [检查的降级有相同的错误]
  4. WinAppDriver 1.2.1

signin.click()给出错误

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

  1. Python 3.10
  2. Selenium 4.1.3 [Checked downgrading got same error]
  3. Appium-Python-Client 2.2.0 [Checked downgrading got same error]
  4. WinAppDriver 1.2.1

signin.click() gives error

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

可遇━不可求 2025-01-31 18:15:23

我找到了解决方案,该解决方案是通过运行:

pip install selenium==3.141.0

source

I found the solution, which is to revert Selenium to 3.141.0 by running:

pip install selenium==3.141.0

Source

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文