我是 appium 的新手,并计划将其用于统一游戏自动化。但是我似乎无法找到应用程序将如何在模拟器/设备上启动?以下是我已经完成的步骤
- 启动模拟器或连接设备(因为应该只连接一个)
- 使用 appium 应用启动 appium 服务器
- 从终端运行 python 脚本
我正在尝试使用联系人管理器示例应用程序。下面是python代码
import os
from time import sleep
from selenium import webdriver
# Returns abs path relative to this file and not cwd
PATH = lambda p: os.path.abspath(
os.path.join(os.path.dirname(__file__), p)
)
desired_caps = {}
desired_caps['device'] = 'Android'
desired_caps['browserName'] = ''
desired_caps['version'] = '4.2'
desired_caps['app'] = PATH('/Users/<uname>/Downloads/ContactManager.apk')
desired_caps['app-package'] = 'com.example.android.contactmanager'
desired_caps['app-activity'] = '.ContactManager'
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
print driver.get_window_size()
以下是来自 appium 应用程序的日志
info: Using local app from desiredCaps: /Users/ears/Downloads/ContactManager.apk
debug: Request received with params: {"sessionId":null,"desiredCapabilities":{"app-package":"com.example.android.contactmanager","app":"/Users/<uname>/Downloads/ContactManager.apk","browserName":"","version":"4.2","device":"Android","app-activity":".ContactManager"}}
debug: Using fast reset? true
info: Creating new appium session 250e7bfd-92bf-4b2a-894c-f4a0e2d02ce7
info: Starting android appium
info: Preparing device for session
info: Checking whether app is actually present
info: Checking whether adb is present
debug: Appium request initiated at /wd/hub/status
info: Responding to client with success: {"status":0,"value":{"build":{"version":"0.15.0","revision":"a7b47d73a27074cc928cc5b325e5d4de1b6e5594"}},"sessionId":"250e7bfd-92bf-4b2a-894c-f4a0e2d02ce7"}
debug: Request received with params: {}
GET /wd/hub/status 200 1ms - 199b
在哪里可以找到详细的日志?它不会在模拟器上启动应用程序。我在 Mac 上,这是适用于 Android 的。我在这里错过了一些微不足道的事情吗?