question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Appium 1.6 beta 2 Xcode 8 - Issues while running tests

See original GitHub issue

Started : iOS_webkit_proxy and Appium server Run tests from C# program having right capabilites its timed out and loading WebDriverAgent app on the phone, its not getting the web view returned to my program, please can someone help me

cd /usr/local/Cellar/ios-webkit-debug-proxy/1.7 && ios_webkit_debug_proxy -c 3a324cbd25dd5a7aa3feed0da73457d7bcdbc5fc:27753 -d
Connected :27753 to iPhone (3a324cbd25dd5a7aa3feed0da73457d7bcdbc5fc)
ss.recv fd=6 len=4
wi.recv[4]:
 00 00 00 D9                                               ....
ss.recv fd=6 len=217
wi.recv[217]:
Nesas-MacBook-Pro:~ nesag$ appium -U 3a324cbd25dd5a7aa3feed0da73457d7bcdbc5fc -p 4723 --full-reset --webkit-debug-proxy-port 27753  --tmp /tmp/ios/
[Appium] Welcome to Appium v1.6.0-beta2
[Appium] Non-default server args:
[Appium]   tmpDir: '/tmp/ios/'
[Appium]   udid: '3a324cbd25dd5a7aa3feed0da73457d7bcdbc5fc'
[Appium]   fullReset: true
[Appium] Deprecated server args:
[Appium]   -U,--udid => --default-capabilities '{"udid":"3a324cbd25dd5a7aa3feed0da73457d7bcdbc5fc"}'
[Appium]   --full-reset => --default-capabilities '{"fullReset":true}'
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium]   udid: '3a324cbd25dd5a7aa3feed0da73457d7bcdbc5fc'
[Appium]   fullReset: true
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"browserName":"iOS","platformVersion":"10.0","automationName":"XCUITest","newCommandTimeout":"9000","deviceName":"iPhone","appium-version":"8.0","platformName":"iOS","sendKeyStrategy":"setValue","--no-reset":false,"appPackage":"uk.co.derivco.betway.sports","app":"/Applications/Appium.app/Contents/Resources/node_modules/appium/Betway.ipa"}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"browserName":"iOS","plat...
[Appium] Creating new XCUITestDriver session
[Appium] Capabilities:
[Appium]   browserName: 'iOS'
[Appium]   platformVersion: '10.0'
[Appium]   automationName: 'XCUITest'
[Appium]   newCommandTimeout: '9000'
[Appium]   deviceName: 'iPhone'
[Appium]   appium-version: '8.0'
[Appium]   platformName: 'iOS'
[Appium]   sendKeyStrategy: 'setValue'
[Appium]   --no-reset: false
[Appium]   appPackage: 'uk.co.derivco.betway.sports'
[Appium]   app: '/Applications/Appium.app/Contents/Resources/node_modules/appium/Betway.ipa'
[Appium]   udid: '3a324cbd25dd5a7aa3feed0da73457d7bcdbc5fc'
[Appium]   fullReset: true
[BaseDriver] Capability 'newCommandTimeout' changed from string ('9000') to integer (9000). This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by appium: appium-version, --no-reset, appPackage.
[BaseDriver] Session created with session id: 4f813c9c-36ad-4ecf-a680-f5c0dec9d8b4
[debug] [XCUITest] Xcode version set to '8.0'
[debug] [XCUITest] iOS SDK Version set to '10.0'
[debug] [XCUITest] Available devices: 3a324cbd25dd5a7aa3feed0da73457d7bcdbc5fc
[debug] [XCUITest] Creating iDevice object with udid 3a324cbd25dd5a7aa3feed0da73457d7bcdbc5fc
[XCUITest] Determining device to run tests on: udid: '3a324cbd25dd5a7aa3feed0da73457d7bcdbc5fc', real device: true
[XCUITest] Safari test requested
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: '/usr/local/bin/idevicesyslog'
[XCUITest] Setting up real device
[XCUITest] Using default agent: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj
[XCUITest] Using default bootstrap: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: /usr/local/bin/carthage
[debug] [XCUITest] Beginning test with command 'xcodebuild -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=3a324cbd25dd5a7aa3feed0da73457d7bcdbc5fc build test' in directory '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Waiting for WebDriverAgent to start on device
[debug] [XCUITest] Log file for xcodebuild test: /Users/nesag/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/C1864A3E-B934-47AE-91E1-799BFA8F4E4A/Session-WebDriverAgentRunner-2016-09-25_115840-6ELxyu.log
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [WebDriverAgent] Device: Sep 25 11:58:47 iPhone XCTRunner[1826] <Notice>: Running tests...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [WebDriverAgent] Device: Sep 25 11:58:48 iPhone XCTRunner[1826] <Notice>: Continuing to run tests in the background with task ID 1
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[XCUITest] Detected that WebDriverAgent is running at url 'http://192.168.0.15:8100'
[XCUITest] WebDriverAgent started at url 'http://192.168.0.15:8100'
[debug] [XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bu...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading...

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:43 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
shussocommented, Oct 11, 2016

@AndreiD you can always forward your feedback to Apple to release better test-automation tools that we can all use to get stuff done. But before thats happening I personally think that Appium+libimobiledevice is the best we got. Thanks alot everybody 👍

3reactions
mgeilichcommented, Oct 6, 2016

I now have Appium successfully testing a hybrid app on a real device under MacOS 10.12 and iOS 10.0.2. The keys for me were:

  1. First, start ios_webkit_debug_proxy. Substitute ‘xxxx’ for your own device UUID: ios_webkit_debug_proxy -c xxxx:27753 -d
  2. Start appium
  3. Start your test script. Make sure the browserName capability is the null string. I run mine (python) with: pytest ios_simple.py The contents of ios_simple.py are:

#!/usr/bin/python

-- coding: utf-8 --

“”" Simple iOS test. “”" import unittest import os import random from appium import webdriver from time import sleep

class SimpleIOSTests(unittest.TestCase):

def setUp(self):
    app = 'com.myco.myapp'
    self.driver = webdriver.Remote(
        command_executor='http://127.0.0.1:4723/wd/hub',
        desired_capabilities={
            'bundleId': app,
            'autoWebview': False,
            'platformName': 'iOS',
            'platformVersion': '10.0',
            'deviceName': 'iPhone',
            'browserName': '',
            'udid': 'put your real device UDID here',
            'realDeviceLogger': '/usr/local/bin/idevicesyslog',
            'locationServicesEnabled': True,
            'locationServicesAuthorized': True,
            'automationName': 'XCUITest'
        })

def tearDown(self):
    self.driver.quit()

def test_click(self):
    random.seed()
    while True:
        webviews = self.driver.contexts
        self.driver.switch_to.context(webviews[1])
        els = self.driver.find_elements_by_class_name('button')
        if len(els) > 0:
            els[0].click()

if name == ‘main’: suite = unittest.TestLoader().loadTestsFromTestCase(SimpleIOSTests) unittest.TextTestRunner(verbosity=2).run(suite)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Old tests which are automated using xcode 7.3 and appium ...
When I try to run old tests which are automated using xcode 7 .3and appium 1.4.13 on appium 1.6.0 beta2 and xcode 8...
Read more >
[XCTestDriver managerProxy]: unrecognized selector sent to ...
Appium fails with the below error. [XCTestDriver managerProxy]: unrecognized selector sent to instance 0x600000051a90 Main reason : XCUIElementTypeKeyboard ...
Read more >
Troubleshooting - Appium
Make sure your system is set up appropriately (i.e., XCode is updated, Android SDK is installed and ANDROID_HOME is set. Make sure the...
Read more >
Xcodebuild failed with code 65 (WARNING: The server did not ...
I m struck up badly. My appium server log says as below: [Xcode] Code signing is required for product type 'UI Testing Bundle'...
Read more >
Appium issues at MAC - Support
I made a Hello World app with XCode to test installing and launching the app, ... appium-version=1.6.4-beta, platformVersion=9.3, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found