Appium Master iOS10 (Xcode 8) Discussion

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?

Just a few quick things to check, il get the details when I’m back at my desktop… Has the web driver agent application been installed onto the device? Does it flash up just before your tests run?

The console will tell you which route is been used but I’m on the mobile at the moment and can’t grab the output, il update this post with more details when I can.

Yes, it shouldn’t matter which version of xcode the developers built the app with when it comes to Appium. It matters what version of xocode you have installed on the machine where you’re running Appium, and the version of iOS on your device/simulator. My app under test was built with xocde 8 also, but I still have XCode 7.3 with Appium 1.5.3 on my test machine, so my scripts still work just fine when I run against my iOS 9.3 iPad and iPhone simulators.

1 Like

Hope this will help

This is the solution I got and it is working fine with inspector.

https://medium.com/@chenchaoyi/the-options-of-inspecting-ios-10-app-with-appium-1-6-534ba166b958#.82oqogqhp

I have tried facebook webdriver agent Inspector, but it is showing blank page. Can any one suggest me how to Inspect element using webdriver agent Inspector in detail ?

It’s most likely a result of the target application not been started on the simulator/device. What are you using to start the target app via appium?

Hi all,

So this is not a complaint but has anyone realised that the Facebook web driver agent is a lot faster than the previous method, pre 1.6.0.

I have just seen multiple cases where test’s have failed because there trying to get the page source too quick, break pointing the test’s so they wait between resolves the issue, but I can’t go around adding wait’s between test’s that wouldn’t be good at all.

I wonder if this has changed, I would have thought that the command would report back before moving onto the next…

UPDATE:

This was a result of the page source been grabbed too quickly whilst the animation between views was still occurring. We create an object for the tableView and store it in the scenarioContext, but it was grabbing the previous table, a simple wait for half a second resolves the issue but a better soloution will be needed.

So given the issues with WDA and black screen after about 7 or 8 application launches (https://github.com/facebook/WebDriverAgent/issues/355, https://github.com/facebook/WebDriverAgent/issues/446), how is everyone managing to do a long series of automated tests? Or are they just accepting the issue and rebooting when it happens?

Or are folks not seeing this issue?

This explains a few things, this has also occurred for myself not sure what we will do yet but if a solution is presented I will update the post.

Thanks Ken.