zoukankan      html  css  js  c++  java
  • Settings

    Settings

    Settings are a new concept introduced by appium. They are currently not a part of the Mobile JSON Wire Protocol, or the Webdriver spec.

    Settings are a way to specify the behavior of the appium server.//Settings是appium创造的一个新概念,不是Mobile JSON Wire 协议或者Webdriver的一部分。

    Settings are: - Mutable, they can be changed during a session - Only relevant during the session they are applied. They are reset for each new session. - Control the way the appium server behaves during test automation. They do not apply to controlling the app or device under test.//建立一个session后,Settings是按照需要可以改变的。Settings只影响appium server的行为,不影响被测试的app和设备。

    An example of a setting would be ignoreUnimportantViews for Android. Android can be set to ignore elements in the View Hierarchy which it deems irrelevant. Setting this can cause tests to run faster. A user who wants to access the ignored elements however, would want to disable ignoreUnimportantViews, and reenable it afterwards.

    Another example of a use-case for settings would be telling appium to ignore elements which are not visible.

    Settings are implemented via the following API endpoints://通过下面的api实现。

    POST /session/:sessionId/appium/settings

    Expects a JSON hash of settings, where keys correspond to setting names, and values to the value of the setting. { settings: { ignoreUnimportantViews : true } }

    GET /session/:sessionId/appium/settings

    Returns a JSON hash of all the currently specified settings. { ignoreUnimportantViews : true }

     

    Supported Settings

    “ignoreUnimportantViews” - Boolean which sets whether Android devices should use setCompressedLayoutHeirarchy() which ignores all views which are marked IMPORTANT_FOR_ACCESSIBILITY_NO or IMPORTANT_FOR_ACCESSIBILITY_AUTO (and have been deemed not important by the system), in an attempt to make things less confusing or faster.

    Android UiAutomator Configurator

    sets UiAutomator Configurator timeouts and delays in Android devices. only works in Android API 18 and above.

    “actionAcknowledgmentTimeout” - Int which is the same as setActionAcknowledgmentTimeout. If a negative value is given, it would set to default(3 * 1000 milliseconds)

    “keyInjectionDelay” - Int which is the same as setKeyInjectionDelay. If a negative value is given, it would set to default(0 milliseconds)

    “scrollAcknowledgmentTimeout” - Int which is the same as setScrollAcknowledgmentTimeout. If a negative value is given, it would set to default(200 milliseconds)

    “waitForIdleTimeout” - Int which is the same as setWaitForIdleTimeout. If a negative value is given, it would set to default(10 * 1000 milliseconds)

    “waitForSelectorTimeout” - Int which is the same as setWaitForSelectorTimeout. If a negative value is given, it would set to default(10 * 1000 milliseconds)

  • 相关阅读:
    用属性封装 Session 及 VIewState 的存取
    正则表达式的一些重要概念
    通用权限的思路。只是一个简单的思路。
    IBATISNETNET 1.3 开发指南系列文章
    Serializable===net对象序列化
    使用Asp.Net构建安全网站
    用汽车售票系统谈数据库结构设计
    图文描述Vs2005制作WEB应用程序安装包的方法[E8.Net正式用户可以找我们获取全部代码参考]
    《基于.NET平台的分层架构实战》系列文章索引
    javascript中outerHTML innerHTML innerTEXT 三者的区别
  • 原文地址:https://www.cnblogs.com/superbaby11/p/6073592.html
Copyright © 2011-2022 走看看