自动化脚本

__author__ = 'Administrator'

#coding=utf-8

from appium import webdriver

import time

desired_caps = {}

desired_caps['platformName'] = 'Android'

desired_caps['platformVersion'] = '4.4.2'

desired_caps['deviceName'] = 'JTJ4C15929005180'

desired_caps['appPackage'] = 'com.quncao.lark'

desired_caps['appActivity'] = 'com.quncao.lark.activity.WelcomeActivity'

driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)

time.sleep(5)

driver.find_element_by_name(u"运动").click()

driver.find_element_by_name(u"户外首页").click()

time.sleep(3)

driver.find_element_by_name(u"全部城市").click()

time.sleep(2)

driver.find_element_by_name(u"上海").click()

time.sleep(1)

driver.find_element_by_name(u"户外活动测试").click()

driver.quit()

你可能感兴趣的:(自动化脚本)