zoukankan      html  css  js  c++  java
  • appium+python 第一个小测试

    import os,time,unittest
    #from selenium import webdriver
    from appium import webdriver
    
    PATH = lambda p:os.path.abspath(os.path.join(os.path.dirname(__file__),p))
    
    desired_caps ={}
    desired_caps['platformName']='Android'
    desired_caps['platformVersion']='5.1.1'
    desired_caps['deviceName'] = 'vivo X7'
    
    desired_caps['app'] = PATH(r'C:UsersAdministratorDesktopapp-debug.apk')
    desired_caps['appPackage'] = 'com.xx.xx'
    desired_caps['appActivity'] = 'com.xx.xx.activity.MainActivity'
    
    
    driver = webdriver.Remote("http://localhost:4723/wd/hub", desired_caps)
    
    time.sleep(10)
    
    #driver.find_element_by_name("0").click()
    time.sleep(3)
    driver.find_element_by_id("com.xx.xx:id/face_filter_btn").click()
    
    driver.quit()
  • 相关阅读:
    linux sed命令详解
    SQL注入基础知识
    DC-7
    DC-6
    DC-5
    DC-4
    DC-3
    DC-2
    pentestlabs
    任意文件读取和下载
  • 原文地址:https://www.cnblogs.com/konkon/p/7590880.html
Copyright © 2011-2022 走看看