appium切换context
作者:互联网
from Common.driver import init_driver
from Common.log import Logger
from time import sleep
driver = init_driver()
logger = Logger().get_logger()
# 获取全部context
print(driver.contexts)
# 获取当前context
print(driver.current_context)
# 切换context
driver.switch_to.context(driver.contexts[-1])
# 打印当前context
print(driver.current_context)
标签:appium,contexts,driver,current,切换,context,print,import 来源: https://www.cnblogs.com/Jerry165/p/14331557.html