alibaba / macaca

Automation solution for multi-platform. 多端自动化解决方案
https://macacajs.github.io
MIT License
3.16k stars 418 forks source link

浏览器多窗口切换如何获取句柄 #962

Closed houseshi closed 4 years ago

houseshi commented 4 years ago

Macaca版本: 2.2.0 基于web自动化。

使用:driver.contexts.getWindowHandle(); 获取值为null。

多窗口的句柄到底怎么进行获取和切换呢 ?

macaca-bot commented 4 years ago

This is the translated issue:


How to get browser multi-window switch handle

Macaca Version: 2.2.0 web-based automation.

Use: driver.contexts.getWindowHandle (); Get value is null.

Handle multiple windows in the end how to access and switch it be?