Get All Contexts

  • Example Usage
  • Description
  • Support
    • Appium Server
    • Appium Clients
  • HTTP API Specifications
    • Endpoint
    • URL Parameters
    • JSON Parameters
    • Response

Get all the contexts available to automate //获取所有可用于自动化的上下文

Example Usage
Java Set contextNames = driver.getContextHandles();
Python contexts = driver.contexts
Javascript // webdriver.io example
let contexts = driver.getContexts();

// wd example
let contexts = await driver.contexts();

Ruby # ruby_lib example
context = available_contexts

# ruby_lib_core example
context = @driver.available_contexts

C# List AllContexts = new List();
foreach (var context in (driver.Contexts))
{
AllContexts.Add(context);
}
PHP $contexts = $driver->contexts();
Description

Retrieve all the contexts available to be automated. This will include, at least, the native context. There can also be zero or more web view contexts. For information on the format of the context names, see the get context documentation. mobile command mobile: getContexts is available on iOS (XCUITest) and Android (UIAutomator2 and Espresso) to get more detailed contexts. For information on contexts, see Appium’s hybrid automation docs.

/* 检索所有可用于自动化的上下文。这至少包括本机上下文。也可以有零个或多个web视图上下文。有关上下文名称格式的信息,请参阅get context文档。mobile command mobile:getContexts可以在iOS(xguitest)和Android(UIAutomator2和Espresso)上获得更详细的上下文。有关上下文的信息,请参阅Appium的混合自动化文档 */

Support
Appium Server
Platform Driver Platform Versions Appium Version Driver Version
iOS XCUITest 9.3+ 1.6.0+ All
UIAutomation 8.0 to 9.3 All All
Android Espresso ?+ 1.9.0+ All
UiAutomator2 ?+ 1.6.0+ All
UiAutomator 4.3+ All All
Mac Mac None None None
Windows Windows None None None
Appium Clients
Language Support Documentation
Java All seleniumhq.github.io
Python All selenium-python.readthedocs.io
Javascript (WebdriverIO) All
Javascript (WD) All github.com
Ruby All www.rubydoc.info
PHP All github.com
C# All github.com
HTTP API Specifications
Endpoint

GET /session/:session_id/contexts

URL Parameters
name description
session_id ID of the session to route the command to
JSON Parameters

None

Response

Array of the names of all available contexts (Array<String>) //所有可用上下文的名称数组(Array)

Appium-Get All Contexts(获取所有上下文)相关推荐

  1. springboot实战 获取spring上下文的4种方式

    实际开发中我们经常需要通过spring上下文获取一些配置信息,本文阐述springboot应用获取spring上下文的几种方式. 方式一:实现ApplicationContextAware接口 imp ...

  2. 【Android FFMPEG 开发】FFMPEG 获取编解码器 ( 获取编解码参数 | 查找编解码器 | 获取编解码器上下文 | 设置上下文参数 | 打开编解码器 )

    文章目录 博客简介 . FFMPEG 编解码器获取流程 I . FFMPEG 获取音视频流的编解码参数 AVCodecParameters *codecpar II . FFMPEG 查找解码器 av ...

  3. 获取当前上下文Activity

    获取当前上下文,用于显示dialog或弹出toast public static Activity getGlobleActivity(){ Class<?> activityThread ...

  4. Spring获取应用上下文通用类SpringContextHolder

    获取应用上下文通用类(以静态变量保存SpringApplicationContext,可在任何代码任何地方任何时候中取出ApplicaitonContext) import java.util.Loc ...

  5. Appium学习笔记2_Android获取元素篇

    在利用Appium做自动化测试时,最重要的一步就是获取对应的元素值,根据元素来对对象进行对应的操作,如果获得对象元素呢? Appium Server Console其实提供了一个界面对话框" ...

  6. python appium 并行多设备_学会使用python启动多个appium server,然后获取多台设备的driver...

    思路如下: 第一步,搭建appium环境,可参考博客 移动端自动化测试-Windows-Android-Appium环境搭建 (我之前已搭建好环境,忽略了第一步) 第二步,使用USB线连接PC端和要测 ...

  7. JS获取服务上下文,兼容上下文为空场景

    为什么80%的码农都做不了架构师?>>>    原理很简单,就是根据已知JS路径来确定. 例如:根目录下有/jquery/widget/colorpicker/bi.ui.color ...

  8. 在SpringBoot应用中获取应用上下文方法

    2019独角兽企业重金招聘Python工程师标准>>> 1.定义上下文工具类: package com.alimama.config;import org.springframewo ...

  9. 获取Spring上下文(ApplicationContext)的三种方法

    原文:https://blog.csdn.net/chenyao1994/article/details/79708496 Spring上下文(ApplicationContext)的获取有三种方式. ...

最新文章

  1. Python 实现九九乘法表
  2. 枚举类型用法_Mybatis-plus常见用法总结三
  3. java赋值兼容原则,多态问题抛出(赋值兼容性原则遇上父类与子类同名函数的时候)...
  4. [转] android自定义布局中的平滑移动
  5. 回lifesinger 的国庆题目
  6. H.264标准(一)MP4封装格式详解
  7. 华为助力“沙漠奇迹”成为高密互联的高尔夫球场
  8. 精准广告投放 —— 业务概念知识
  9. Sicar标准柜架模板 3.0 版 西门子S7-1500PLC PN总线程序
  10. C++ 长度不固定的二维数组传参
  11. 数字系统实验—第11-12周任务(认识数据存储芯片HM62256、IP核、LPM开发流程和平台、 IIC串行总线时序分析)
  12. yolo实现交通信号灯视频流识别代码搬运及调试
  13. 华为手机充当电脑的无线U盘 - 华为无线连接电脑 - 华为分享
  14. 传销式招聘!被骗到东南亚的程序员到底有多惨?
  15. 腾讯云带宽价格表(包年包月/按量计费/流量价格)
  16. 尚有缺者,方为完美。小人求全,智者求阙——《致温弟沅弟》曾国藩
  17. 安徽大学本科毕业论文答辩和论文选题PPT模板
  18. 爱德华·琼斯(Edward Jones)公司
  19. 华硕笔记本开机自动进入bios,进不了windows系统的解决方法
  20. 计算机考试word文档怎么画坐标,使用WORD画坐标系的方法

热门文章

  1. 适用于mac的Tor浏览器?
  2. C++结构体定义及初始化
  3. gpt分区安装win7 64位图文教程
  4. 六西格玛与统计数字化
  5. 网页防篡改系统与网站安全
  6. Sugar BI : 如何制作数据桶
  7. 求两个正整数的最小公倍数
  8. SDK棋牌游戏盾防护原理解析
  9. myEclipse导出jar包,cmd执行项目中的main函数
  10. java 正则 小括号_java正则表达式匹配小括号内的内容