python + appium 实践

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()

 

上一篇:最新App自动化测试之Appium环境搭建以及python自动化脚本demo演示


下一篇:如何解决访问vCenter Server时出现 “503 service unavailable”?