WinAppDriver - 获取窗口句柄标题

发布于 2025-01-15 13:41:58 字数 327 浏览 4 评论 0原文

我需要创建一种使用 WinAppDriver 从一个窗口切换到另一个窗口的算法,如下所示 windowsDriver.SwitchTo().Window(allWindowHandles[0])。但是,我还需要在 windowsDriver.WindowHandles 中找到的页面标题,或者至少是当前焦点页面的标题及其十六进制值。有什么方法可以使用 Winappdriver 实现此目的吗?

我应该提到的是,我通过 Appium 将 WinAppDriver 与 Selenium Grid 一起使用,以实现测试自动化目的。因此,我不知道网格中的哪台机器将执行特定的测试。

I need to create an algorithm that switches from one windows to another using WinAppDriver like this windowsDriver.SwitchTo().Window(allWindowHandles[0]). However, I also need the Title of the pages found in windowsDriver.WindowHandles, or at least the Title of the currently focused page and its hex value. Is there any way I could achieve this using Winappdriver?

I should mention that I'm using WinAppDriver with a Selenium Grid via Appium, for Test Automation purposes. Therefore, I do not know which machine in the grid is going to execute a particular Test.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文