根据下面的步骤检查一下:
1、打开计算机属性——高级系统设置——环境变量
2、新建一个环境变量,变量名:ANDROID_HOME,变量值:D:\Program Files\android-sdk-windows(以你安装目录为准,确认里面有 tools 和 add-ons 等多个文件夹),点击确认。
3、在用户变量 PATH 后面加上变量值;%ANDROID_HOME%\platform-tools;点击确认即可。 在系统变量 path 中添加;D:\Program Files\android-sdk-windows\tools
4、Android SDK 配置完成,接下来验证配置是否成功。
5、点击运行——输入 cmd——回车——输入 adb——回车,如果出现一堆英文,即表示配置成功,在输入 Android,启动 Android SDK Manager。
你的 Android SDK 环境是否配置好了?
可以看看这个帖子 http://testerhome.com/topics/201
用 Goagent 就 OK 了
#2 楼 @seveniruby 有必要发个提问的智慧了
#25 楼 @wusen 建议你看看这个帖子 http://testerhome.com/topics/155
预定一个,虽然已经入门,但还是希望能把基础再打牢一点
Android 的不太明白,其他同学看看吧
另,换个头像吧
如果还不行,你可以自己启动 Instruments 工具来试试
Appium Log
Kingsons-MacBook:Study kingson$ appium -U 1a601f5cd791bc379115095fc81cd69b096582a3 --app com.telenavsoftware.doudouy
info: Welcome to Appium v0.11.4 (REV b04decd191002628c88e9bf475553da1cd04a036)
info: Appium REST http interface listener started on 0.0.0.0:4723
info - socket.io started
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"sessionId":null,"desiredCapabilities":{"device":"iPhone Simulator","platform":"Mac","browserName":"iOS","version":"7.0","app":"com.telenavsoftware.doudouy"}}
info: App is an iOS bundle, will attempt to run as pre-existing
info: Creating new appium session a36fdf63-9b22-48a4-bb01-4b44ddb54aff
info: Removing any remaining instruments sockets
info: Cleaned up instruments socket /tmp/instruments_sock
info: Cleaning up any tracedirs
info: No tracedirs to clean up
info: Localizable.strings is not currently supported when using real devices.
info: Not setting device type since we're connected to a device
info: Starting iOS device log capture via idevicesyslog
debug: Real device specified but no ipa, assuming bundle ID is on device
debug: Creating instruments
info: instruments is: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: [INSTSERVER] Instruments socket server started at /tmp/instruments_sock
info: Attempting to run app on real device with UDID 1a601f5cd791bc379115095fc81cd69b096582a3
info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w 1a601f5cd791bc379115095fc81cd69b096582a3 com.telenavsoftware.doudouy -e UIASCRIPT /usr/local/lib/node_modules/appium/lib/devices/ios/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments/
info: And extra without-delay env: {}
info: And launch timeout: 90000ms
info: [INST STDERR] 2013-12-10 10:40:22.536 instruments[53424:507] Connection to the remote device lost while launching target. Aborting...
info: [INST STDERR] 2013-12-10 10:40:22.539 instruments[53424:507] Recording cancelled : At least one target failed to launch; aborting run
info: [INST STDERR] Instruments Trace Error : Error Domain=com.apple.instruments Code=1 "Error Starting Recording" UserInfo=0x7ff6d308f220 {NSLocalizedDescription=Error Starting Recording, NSLocalizedRecoverySuggestion=At least one target failed to launch; aborting run}
Instruments Trace Error : Failed to start trace.
info: [INSTSERVER] Instruments exited with code 253
error: Instruments did not launch successfully, failing session
info: Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Instruments did not launch successfully--please check your app paths or bundle IDs and try again
info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Instruments did not launch successfully--please check your app paths or bundle IDs and try again)","origValue":"Instruments did not launch successfully--please check your app paths or bundle IDs and try again"},"sessionId":null}
POST /wd/hub/session 500 6015ms - 342b```
我的部分代码片段:
```python
class TestSequenceFunctions(unittest.TestCase):
def setUp(self):
# set up appium
app = "com.telenavsoftware.doudouy"
#app = os.path.join(os.path.dirname(__file__),
# '../../apps/DDY/build/',
# 'DouDouY.app')
#app = os.path.abspath(app)
self.driver = webdriver.Remote(
command_executor='http://127.0.0.1:4723/wd/hub',
desired_capabilities={
'browserName': 'iOS',
'device': 'iPhone Simulator',
'platform': 'Mac',
'version': '7.0',
'app': app
})```