About Appium-Python-Client-API

来看看appium-python-client库都有哪些常用的api可用。

contexts

Lib\site-packages\appium\webdriver\extensions\context.py

@property
def contexts(self):
    """Returns the contexts within the current session.
    返回当前会话中的上下文,使用后可以识别H5页面的控件
    Usage:
        driver.contexts

    Return:
        :obj:`list` of :obj:`str`: The contexts within the current session

    """
    return self.execute(Command.CONTEXTS)['value']
可以跟switch_to_content()连用,用于切换到相应的H5控件中。
View Code

相关文章:

  • 2022-12-23
  • 2022-01-01
  • 2021-11-30
  • 2021-04-12
  • 2021-08-17
  • 2021-11-21
猜你喜欢
  • 2022-12-23
  • 2021-11-30
  • 2021-11-28
  • 2021-12-05
相关资源
相似解决方案