Appium Master iOS10 (Xcode 8) Discussion

I’ve been trying to get it running on real device for about 3 days now at this stage. have Appium 1.6Beta, xcode 8 GM and devices with ios 9.3.2 and 10.0, and it gets as far as putting the WebDriverAgentRunner onto the devices and then sits there waiting for them to start :
[XCUITest] Waiting fo WebDriverAgent to start on device
but it never does.

If I execute the command which it prints out just prior ( xcodebuild -project … -scheme WebDriverAgentRunner - sdk iphoneos -destination… test) from a command line, it works fine, and I see the lines

ServerURLHere->http://…<-ServerURLHere
Listening on USB

as expected, yet never when run from appium…

Any ideas?
Thanks in advance
Ken

Hi Ken,

How are you initialising the application? I have yet to test on a real device but thats next on the list so I will let you know what happens.

I use a C# Mobile Framework which we have written in-house to support our mobile development and test automation, this hasn’t had an issue with the simulator (As far as launching the application) but if you take a look at https://github.com/appium/appium-xcuitest-driver there are some external dependencies for getting things running on a real device.

Let me know how you get on and I will do the same in due course.

Thanks

Hi Christopher,
yeah i’ve got those dependencies all installed, as I said I can see the WebDriverAgent being loaded to the device, it starts up and then goes into the background.
I’m using the python client, which works fine with the same appium version etc using android, but it’s just the ios using xcuitest driver which seems to be getting stuck, and I can’t figure out why.
Ken

Just a thought, the parameters been sent when you launch the application is the bundle identifier correct?

I’m not sure it’s even getting far enough for that to be a problem; appium is never seeing the ‘ServerURLHere’ line to indicate that webdriveragent has started, but when i run the same (I assume - I copy it from the output of appium) command directly from the command line, I do see it in the log.

I’ll try copy the 2 log scenarios here in a short while

Thanks Ken, if you can include an example Python script I can also follow along with my application to see if the results are the same.

May not get a chance until after the weekend is over.

gist here:


3 logs in that, first one is the xcodebuild log output , 2nd is the output from the console of appium and 3rd is when i run the same command from the commad line and it appears to get into the state that appium is waiting for

pythonwise it’s very simple:

from appium import webdriver
caps = {‘deviceName’: “iPad”, ‘udid’: ‘123456789123456789123456789123…’, ‘app’: ‘/Users/User/ios10_testing/iPadDemo/build/Debug-iphoneos/iPadDemo.app’, ‘platformVersion’: ‘9.3.2’, ‘platformName’: ‘iOS’, ‘automationName’: ‘xcuitest’}
driver = webdriver.Remote(“http://0.0.0.0:4723/wd/hub”, caps)

eventually will come back with a stackdump ending with exception:
httplib.BadStatusLine: ‘’

it’s the same for ios10 device too,
Ken

I managed to get it working. I wasn’t specifying the realDeviceLogger capability
only took a week!

Ha brilliant don’t think I would have caught that one I use different capabilitys in my framework.

I have successfully launched iphone simulator with the following code in eclipse with appium server using ios10 update with Xcode8 using XCUITest.

public class LoginTest {

public static void main(String[] args) throws MalformedURLException {
// TODO Auto-generated method stub

DesiredCapabilities cap=new DesiredCapabilities();

File f= new File("/Users/devendra/Desktop/Appium/PogoiOS.app");
cap.setCapability(MobileCapabilityType.PLATFORM_NAME, “iOS”);
cap.setCapability(MobileCapabilityType.PLATFORM_VERSION, “10.0”);
cap.setCapability(MobileCapabilityType.DEVICE_NAME, “iPhone 6”);
cap.setCapability(MobileCapabilityType.AUTOMATION_NAME,“XCUITest”);
cap.setCapability(MobileCapabilityType.BROWSER_NAME, “”);
cap.setCapability(MobileCapabilityType.APP,f.getAbsolutePath());

IOSDriver driver = new IOSDriver(new URL(“http://127.0.0.1:4723/wd/hub”),cap);
//driver.manage().timeouts().implicitlyWait(600, TimeUnit.SECONDS);

}

}

Hi Madhuri…

Thanks for sharing.
Continuing further, are you able to get control of the elements on your app screen? Like, click, tap, sendkey, setvale events…
Also, apart from, driver.getPAgeSource(), are you able to use any other inspection means?

Keep posting!

Hi,

To get control of the elements on your app screen ,

UIATextField[1] is now XCUIElementTypeTextField[1]. But I need to explore more for the same as I am also on the way to automate with ios 10 & xcode 8 :slight_smile:

:+1:
Good luck, keep posting. We really need to keep this thread updated to ensure smooth transition to xcode 8.

I know it’s been some time since the initial post, but I will most likley be taking the jump this week to uplift appium and my project. I have been keeping an eye on the github commit’s and believe it’s time!

If anyone has any tip’s or warnings please let me know!

1 Like

Please help me out
In my case it is getting stuck on
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading…
[debug] [XCUITest] Waiting for WebDriverAgent server to finish loading…

Even i added realDeviceLogger capability.

Environment

  1. iPad: 10.1
  2. Appium 1.6.2
  3. Xcode: 8.1

Please help me out of this

@ssj87 Is this on simulator or real device and can you copy in your capabilities?

Check the bundle identifier is correct in the launch parameters, if it’s incorrect appium will apear to hang.

Thanks for this Chris, its really useful!

My Developers just gave me the first build of an iOS app that was built with Xcode 8 (8.2.1 to be exact). To my surprise, my Appium scripts are working on my iPhone 6 running iOS 9.3. I thought I’ve read on this forum that if you build the app with XCode 8.x, the ‘old’ locator strategies won’t work, and the Appium Server 1.6.x is required along with the new locator strategies.

I definitely need to move my devices to iOS 10 soon, but if I keep my phone on iOS 9.x, should my current iOS scripts continue to work with Appium Server 1.5.3, even though the app was built with Xcode 8.x?

how to test my own app by replacing test integration app on WebDriverAgent xcodeproject?