zoukankan      html  css  js  c++  java
  • jQuery火箭图标返回顶部代码

    Appium作为当下一款移动应用的自动化测试工具,对于测试来说重要性不言可寓,废话不多说,下面总结下它常用的API:

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

    2.scroll
    scroll(self, origin_el, destination_el):
      Scrolls from one element to another
      从元素 origin_el滚动元素 destination_el
      Args:
      - originalEl - the element from which to being
      scrolling
      - destinationE1- the element to scroll to
      Usage:
      driver.scroll(el1, el2)

    3.drag_and_drop
    drag_and_drop(self, origin_el, destination_el):
      Drag the origin element to the destination element
      将元素origin_el拖到目标元素 destination_el
      Args:
      - originEl - the element to drag
      - destinationE1- the element to drag to
      Usage:

      driver.drag_and_drop(el1,el2)

    4.tap

    tap(self, positions, duration=None):
      Taps on an particular place with up to five fingers, holding for a certain time
      模拟手指点击 最多五个手指,时间为毫秒
      :Args:
      - positions - an array of tuples representing the x/y coordinates of the fingers to tap. Length can be up to five.
      - duration - (optional) length of time to tap, in ms
      Usage:

      driver.tap([(x,y),(x1,y1)],500)

    5.swipe
    swipe(self, start_x, start_y, end_x, end_y, duration=None):
      Swipe from one point to another point, for an optional duration.
      从A点滑动 B点 滑动,时间为毫秒
      Args:

      - start_x - x-coordinate at which to start
      - start_y - y-coordinate at which to start
      - end_x - x-coordinate at which to stop
      - end_y - y-coordinate at which to stop
      - duration - (optional) time to take the swipe, in ms.
      Usage:

      driver.swipe(x1,y1,x2,y2,500)
    7.launch _app

    launch_app(self):
      Start on the device the application specified in the desired capabilities.
      启动app
      Usage:
      driver.launch_app()

    8.click

    click(self):

      Clicks the element.

         点击元素

      Usage:

      element.click()

    9.size

    size(self):
      The size of the element.
      获取元素 的大小和高宽
      new_size["height"] = size["height"]
      new_size["width"] = size["width"]
      Usage:

      driver.element.size

    10.location

    location(self):
      The location of the element in the renderable canvas.
      获取取元 素的坐标
      Usage:

      driver.element.location 

      driver.element.location.get('x')  ''返回element的x坐标, int 型''
      driver.element.location.get('y')  ''返回element的y坐标, int 型''

    待续~
       

  • 相关阅读:
    python线程详解
    Beego框架在模板中使用自定义函数
    golang打印英文格式时间日期
    如何让SQL语句不执行默认排序,而是按照in语句的顺序返回结果
    Git clone 报错 Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching cipher found. Their offer: aes128-cbc,3des-cbc,blowfish-cbc
    Mysql去掉html标签函数
    Nodejs的npm安装模块时候报错:npm ERR! Error: CERT_UNTRUSTED的解决方法
    树莓派使用DHT11温湿度传感器
    ubuntu源列表(清华,阿里,官方,选一即可)
    将tgz文件解压到指定目录
  • 原文地址:https://www.cnblogs.com/cnkemi/p/9169475.html
Copyright © 2011-2022 走看看