• #21 楼 @crease 你也是 8.0 以上的机器卡死在启动界面?8.0 以下的机器就 ok 吗? 你问下你们开发打的包 sdk 是多少?

  • #28 楼 @seveniruby 谢谢了 已经解决了,直接用 WEBVIEW 或者 WEBVIEW_com....就可以,用 WEBVIEW_0 就不行。

  • #4 楼 @panzhigang 已经搞定了,谢谢啊。

  • #1 楼 @panzhigang els = self.driver.find_elements_by_xpath('/html/head/title')
    print len(els)
    print els[0].text
    嗯,我换成这样的话获取的 len 是 1.但是 els[0].text 内容为什么是空的呢?

  • #4 楼 @lihuazhang 我发现 driver.switch_to.context('WEBVIEW') 成功后,手机一直停到当前页面,下一步应该怎么去获取 webview 的内容呢? 是要 browser = webdriver.Chrome() 吗?

  • #14 楼 @seveniruby 我机器是 4.4.4 的,打印出的 driver.content 是 [u'NATIVE_APP', u'WEBVIEW_com.android.browser', u'WEBVIEW_com.oumg, u'WEBVIEW_com.qihoo.appstore'],但是为什么我执行 driver.switch_to.context('WEBVIEW_0'),为什么还是报 NoSuchContextException: Message: u'No such context found.' ?

  • #4 楼 @lihuazhang 这个是什么意思呢?是意思 browser=webdriver.Firefox() 这样吗?就像 seleniun 那样? 还是? appium 怎么搭配 webdriver 中的 api 呢?

  • #8 楼 @lihuazhang 是不是必须 4.4.2 系统以上?

  • #1 楼 @lihuazhang 需要被测手机的对应虚拟机下载好了才能跑起来吗?

  • 你把登陆封装起来,去调用它。

  • #6 楼 @seveniruby 那您建议是看那个参数呢?如果用 adb shell dumpsys meminfo 中 Davilk 对应的 Heap
    Alloc 靠谱吗?

  • #19 楼 @link1220 我们 app 是适配了 ios8.0 系统的哦,您的 sdk 版本过低是指?

  • #17 楼 @monkey 嗯,好的,看看能不能拿到代码。

  • #15 楼 @monkey 现在想不通的是同样的 app,一个装在 ios8.1 的设备上,用 xcode6 跑,会卡死,但是装在 ios7.1.1 的设备在 xcode6 和 xcode5 上都可以跑起来,不知道有什么区别呢,哎。。。

  • #12 楼 @monkey 哎,公司拿不到代码。。。

  • #10 楼 @monkey这个用 appium 跑到 log 和 automation 的情况一样,都是脚本在跑,但是 app 界面卡死在首个界面,请大神帮忙分析下,使用 xcode5 都是可以跑起来的,但是 xcode6.1.1 就不行了。

    info: [debug] App is an iOS bundle, will attempt to run as pre-existing

    info: [debug] Creating new appium session 6b068aca-e2a4-44ee-9c0f-88f057a4ab12

    info: [debug] Removing any remaining instruments sockets

    info: [debug] Cleaned up instruments socket /tmp/instruments_sock

    info: [debug] Setting Xcode folder

    info: [debug] Setting Xcode version

    info: [debug] Setting iOS SDK Version

    info: [debug] Getting sdk version from xcrun with a timeout

    info: [debug] iOS SDK Version set to 8.1

    info: [debug] Not checking whether simulator is available since we're on a real device
    info: [debug] Detecting automation tracetemplate

    parseFileSync() is deprecated. Use parseStringSync() instead.

    info: [debug] Not auto-detecting udid, running on sim
    info: [debug] Could not parse plist file (as binary) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com. Ace/en.lproj/Localizable.strings
    info: Will try to parse the plist file as XML
    info: [debug] Could not parse plist file (as XML) at /Applications/Appium.app/Contents/Resources/node_modules/appium/com. Ace/en.lproj/Localizable.strings
    warn: Could not parse app Localizable.strings; assuming it doesn't exist
    info: [debug] Creating instruments
    info: On some xcode 6 platforms, instruments-without-delay does not work. If you experience this, you will need to re-run appium with the --native-instruments-lib flag
    info: [debug] Preparing uiauto bootstrap
    info: [debug] Dynamic bootstrap dir: /Users/Ace/Library/Application Support/appium/bootstrap
    info: [debug] Dynamic env: {"nodePath":"/Applications/Appium.app/Contents/Resources/node/bin/node","commandProxyClientPath":"/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js","instrumentsSock":"/tmp/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false}

    info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!
    ...
    info: [debug] Dynamic bootstrap path: /Users/Ace/Library/Application Support/appium/bootstrap/bootstrap-60f23230385b0cfa.js
    info: [debug] Reusing dynamic bootstrap: /Users/Ace/Library/Application Support/appium/bootstrap/bootstrap-60f23230385b0cfa.js

    info: [debug] Getting device string from opts: {"forceIphone":false,"forceIpad":false,"xcodeVersion":"6.1.1","iOSSDKVersion":"8.1","deviceName":"iOS","platformVersion":"8.0"}
    info: [debug] fixDevice is on
    info: [debug] Final device string is: 'iOS (8.0 Simulator)'
    info: [debug] Not setting device type since we're on a real device
    info: [debug] Checking whether we need to set app preferences
    info: [debug] Not setting iOS and app preferences since we're on a real device
    info: [debug] Running ios sim reset flow
    info: [debug] Killing the simulator process
    info: [debug] Killall iOS Simulator
    info: [debug] Killing any other simulator daemons

    info: [debug] On a real device; cannot clean device state

    info: [debug] Not setting locale because we're using a real device
    info: [debug] No iOS / app preferences to set
    info: [debug] Starting iOS device log capture via deviceconsole

    info: [debug] Not pre-launching simulator

    info: [debug] Creating iDevice object with udid a15a5c8e453d2aff23ee73d3627e3691894fc1e8
    info: [debug] Couldn't find ideviceinstaller, trying built-in at /Applications/Appium.app/Contents/Resources/node_modules/appium/build/libimobiledevice-macosx/ideviceinstaller
    info: [debug] Checking app install status using: /Applications/Appium.app/Contents/Resources/node_modules/appium/build/fruitstrap/fruitstrap isInstalled --id a15a5c8e453d2aff23ee73d3627e3691894fc1e8 --bundle com. Ace

    info: [debug] App is installed.

    info: [debug] fullReset not requested. No need to install.
    info: [debug] Starting command proxy.

    info: [debug] Instruments socket server started at /tmp/instruments_sock
    info: [debug] Starting instruments

    info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments

    info: Launching instruments

    info: [debug] Attempting to run app on real device with UDID a15a5c8e453d2aff23ee73d3627e3691894fc1e8
    info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w a15a5c8e453d2aff23ee73d3627e3691894fc1e8 com. Ace -e UIASCRIPT "/Users/Ace/Library/Application Support/appium/bootstrap/bootstrap-60f23230385b0cfa.js" -e UIARESULTSPATH /tmp/appium-instruments
    info: [debug] And extra without-delay env: {}
    info: [debug] And launch timeouts (in ms): {"global":90000}

    info: [debug] [INST STDERR] 2014-12-14 21:10:12.522 instruments[2025:6403] WebKit Threading Violation - initial use of WebKit from a secondary thread.

    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:11 Administratorde-iPod kernel[0] : xpcproxy[938] Container: /private/var/mobile/Containers/Data/Application/1C796F3E-4AA1-45E2-BD54-C13D085CDDF8 (sandbox)

    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:11 Administratorde-iPod Ace[938] : MS:Notice: Injecting: com. Ace Ace

    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:11 Administratorde-iPod locationd[120] : Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0

    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:11 Administratorde-iPod ScriptAgent[939] : MS:Notice: Injecting: com.apple.UIAutomationPlugIn ScriptAgent

    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:11 Administratorde-iPod notification_proxy[281] : 0x303000 -[MNPLockdownConnection receiveMessage]: lockdown_receive_message error!

    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:11 Administratorde-iPod notification_proxy[281] : 0x281000 -[MNPLockdownConnection receiveMessage]: lockdown_receive_message error!

    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:12 Administratorde-iPod Ace[938] : assertion failed: 12A365: libxpc.dylib + 51955 [84E1BEE3-B897-39DD-9A7B-D061B6B252C5]: 0x7d

    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:12 Administratorde-iPod Unknown[938] :

    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:12 Administratorde-iPod pasteboardd[941] : MS:Notice: Injecting: (null) pasteboardd

    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:12 Administratorde-iPod Ace[938] : registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later.

    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:13 Administratorde-iPod Ace[938] : img

    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:13 Administratorde-iPod Ace[938] : 111spring

    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:13 Administratorde-iPod Ace[938] : 222spring_11
    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:13 Administratorde-iPod Ace[938] : 222spring_33
    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:13 Administratorde-iPod Ace[938] : 222spring_21
    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:13 Administratorde-iPod Ace[938] : 222spring_12

    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:13 Administratorde-iPod Ace[938] : 222tutorials_more
    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:13 Administratorde-iPod Ace[938] : 222tutorials_switchingChannel
    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:13 Administratorde-iPod Ace[938] : 222spring_31
    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:13 Administratorde-iPod Ace[938] : 222whitePoint
    info: Instruments is ready to receive commands
    info: [debug] Instruments launched. Starting poll loop for new commands.
    info: [debug] Setting bootstrap config keys/values
    info: [debug] Pushing command to appium work queue: "target = $.target();\nau = $;\n$.isVerbose = true;\n"

    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:13 Administratorde-iPod Ace[938] : 222bluePoint
    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:13 Administratorde-iPod Ace[938] : 222tutorials_editChannels
    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:13 Administratorde-iPod Ace[938] : 222spring_22
    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:13 Administratorde-iPod Ace[938] : 222spring_13
    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:13 Administratorde-iPod Ace[938] : 222spring_car
    info: [debug] Socket data received (2 bytes)
    info: [debug] Socket data being routed.
    info: [debug] Sending command to instruments: target = $.target();
    au = $;
    $.isVerbose = true;

    info: [IOS_SYSLOG_ROW ] Dec 14 21:10:13 Administratorde-iPod Ace[93

  • #10 楼 @monkey 我的 app 是直接安装好的,是他们打好的开发者证书的包,用 xcode5 就可以跑起来哦。

  • #7 楼 @monkey 你说的是 window-origener 的 log 吗?我看了只有以前 crash 的 log。 automationplist 的 log 就是正常的点击的几个坐标。现在的情况是脚本实际运行起来了一直在跑,但是 app 卡死在第一个界面。

  • #2 楼 @monkey 好像除了 uss 都包含共享库的内存

  • #1 楼 @michaelian 怎么用 selendroid 模式呢? api 和 appium 有区别吗?

  • #7 楼 @monkey 好的谢谢 我试试

  • #3 楼 @monkey 是在 orgnize 里边那个?

  • #4 楼 @lifreshman 是的,是真机。

  • #1 楼 @monkey 是 app 的 log 吗? automation 没有任何 log。