gpt4 book ai didi

node.js - 如何在 NodeJS WebDriver 中切换窗口?

转载 作者:太空宇宙 更新时间:2023-11-04 00:54:59 24 4
gpt4 key购买 nike

当没有 getWindowHandles() 函数时,如何获取在 WebDriverJS 中打开的新窗口的窗口句柄?

我需要切换到一个新窗口来使用 Facebook 登录进行测试。

最佳答案

该函数在 NodeJS Webdriver 中被称为 getAllWindowHandles(),请参阅此处:http://selenium.googlecode.com/git/docs/api/javascript/class_webdriver_WebDriver.html

关于node.js - 如何在 NodeJS WebDriver 中切换窗口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30323647/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com