connie_tong

导航

 
from appium import webdriver

caps = {}
caps["platformName"] = "Android"
caps["platformVersion"] = "7.1.2"
caps["deviceName"] = "127.0.0.1:62001 device"
caps["appPackage"] = "com.easytone.ipimmeeting"
caps["appActivity"] = "ui.login.LoginActivity"
caps["resetKeyboard"] = True
caps["unicodeKeyboard"] = True

driver = webdriver.Remote("http://localhost:4723/wd/hub", caps)

el1 = driver.find_element_by_id("com.easytone.ipimmeeting:id/tvLoginByAccount")
el1.click()
el2 = driver.find_element_by_id("com.easytone.ipimmeeting:id/etAccount")
el2.click()
el3 = driver.find_element_by_id("com.easytone.ipimmeeting:id/etAccount")
el3.clear()
el3.send_keys("wiwi")
el4 = driver.find_element_by_id("com.easytone.ipimmeeting:id/etPassword")
el4.click()
el4.send_keys("Aa123456")
el5 = driver.find_element_by_id("com.easytone.ipimmeeting:id/btnLogin")
el5.click()

driver.quit()

 1、安装appium

下载地址:链接:https://pan.baidu.com/s/1QcxljapUO6HUNxH_B-GV1w
提取码:efg7

 

2、启动appium

 

python环境配置

 

在pycharm中建立项目将代码粘入,在运行之前,还需通过pip命令安装pip install Appium-Python-Client依赖包

 

posted on 2021-03-15 16:26  connie_tong  阅读(56)  评论(0编辑  收藏  举报