我正在尝试使用 appium 来测试一个带有真实手机的应用程序。它将在启动时花费 25 秒。如何加快速度?
appium 桌面版本:1.5
安卓操作系统:7.1
from appium import webdriver
class AppTester(object):
"""docstring for AppTester"""
def __init__(self, command_executor, desired_capabilities):
super(AppTester, self).__init__()
self.driver = webdriver.Remote(command_executor, desired_capabilities)
def click_ui_element(self, ui_selector):
self.driver.find_element_by_android_uiautomator(ui_selector).click()
import time
from app_tester.tester import *
app_caps = {
'platformName': 'Android',
'deviceName': 'Android Emulator',
'platformVersion': '7.1',
'appPackage': 'com.freescale.kinetisbletoolbox',
'appActivity': 'com.freescale.bletoolbox.activity.CheckActivity',
'autoGrantPermissions': True,
# 'locationServicesAuthorized': True,
'autoAcceptAlerts': True,
# 'gpsEnabled': True,
'noReset': True,
'fullReset': False,
}
app_url = 'http://localhost:4723/wd/hub'
secs = time.time()
app = AppTester(app_url, app_caps)
print 'start App assume %ds'%(time.time()-secs)
app.click_ui_element('new UiSelector().text("Beacons")')
print 'click ui spends %ds'%(time.time()-secs)