#coding=utf-8 from appium import webdriver import subprocess desired_caps = {} desired_caps['platformName'] = 'Android' desired_caps['platformVersion'] = '23' desired_caps['deviceName'] = '192.168.207.101:5555' desired_caps['appPackage'] = 'com.android.calculator2' desired_caps['appActivity'] = '.Calculator' # subprocess.call('start /b taskkill /f /t /im node.exe',shell=True,stdout=open('log.txt','w'),stderr=subprocess.STDOUT) # cmd = 'start /b appium -a 127.0.0.1 -p 4723 --command-timeout 500 --automation-name Appium -U 192.168.207.101:5555' # print(cmd) # subprocess.call(cmd,shell=True,stdout=open('log.txt','w'),stderr=subprocess.STDOUT) driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps) driver.find_element_by_name("1").click() driver.find_element_by_name("5").click() driver.find_element_by_name("9").click() driver.find_element_by_name("delete").click() driver.find_element_by_name("9").click() driver.find_element_by_name("5").click() driver.find_element_by_name("+").click() driver.find_element_by_name("6").click() driver.find_element_by_name("=").click() driver.quit()
test
最新推荐文章于 2024-06-19 22:23:29 发布