contexts = driver.contexts
# 获取所有页面
print(contexts)
# 获取当前页面
print(driver.current_context)
# 修改下标定位到需要的页面
driver.switch_to.context(driver.contexts[0])
app自动化元素识别:原生与h5混合页面
最新推荐文章于 2023-06-01 16:49:11 发布
contexts = driver.contexts
# 获取所有页面
print(contexts)
# 获取当前页面
print(driver.current_context)
# 修改下标定位到需要的页面
driver.switch_to.context(driver.contexts[0])