Getting existing automation to run with new appium-xcuitest-driver

Hi @jonahss: I want to test the appium-xcuitest-driver. I installed with npm install -g appium-xcuitest-driver. How do I run this now? Or how do I make sure that Appium is using this driver now, when I run my tests instead of the old appium-ios-driver? Like forcing Appium to pick up that driver! When I let the new driver run with node it starts listening on localhost, but if I start my test now, we kill all drivers and start a new one. Now its not picking up the xcuitest-driver. When I set capabilities.setCapability(ā€œautomationNameā€, ā€œxcuitestā€); doesnt help either, it states: Details: The desiredCapabilities object was not valid for the following reason(s): automationName xcuitest not part of Appium,Selendroid,WebDriverAgent. I read that its actually not needed to set capabilities. Do I have to delete or uninstall the appium-ios-driver?
thanks for some help what the next steps could be to get it to run with the appium-xcuitest-driver

Juliane

UPDATE PROGRESS:
I just deleted the appium-ios-driver from my node-modules and added the appium-xcuitest-driver. When I run my test now, it complaints that it cannot find module ā€˜appium-ios-driverā€™. How do I get Appium to use the new driver?

Hi @julesmummdry, have you been able to get the XCUITest Driver running?

I am in the same situation right now: Existing test automation is set up with appium-ios-driver and should be replaced with appium-xcuitest-driver.

Any hint on what to do next is highly appreciated.

Cheers,
Christian

Hi Christian @Jander , I tried several things and replaced the index.js from the ios-driver with the new xcuitest-driver (like copied into the other), so the implementation of xcui is in the ios-driver so it doesnt complain about, that the it cant find xcui-test. But the interface is still quite different, thats why it doesnt run. I think for now we can just wait until they release it with Appium 1.6. and then it should be easy to use. Sorry that I couldnt help more. Cheers Jules

@julesmummdry

Hi Jules, thanks for your reply.

In the meantime, I have tried the following (without success):

  1. Installed Node.js and NPM
  2. Installed ā€˜appium-xcuitest-driverā€™
  3. Changed the implementation in Appium.app/Contents/Resources/node_modules/appium/build/lib/appium.js to use the WebDriverAgentDriver (which is the one defined in appium-xcuitest-driver 1.0.4) if the platform is ā€œiosā€.
  4. The current implementation of determineDevice() in driver.js does not yet support real devices (only simulator)ā€¦ so I changed this implementation to return my real device without a check.

Next I ran into an error, that says, that the Info.plist could not be extracted from the ipa. But the same ipa works with the appium-ios-driver.

So I gave up. :disappointed:

Hmm, @Janderā€™s approach should work. The ipa problem is a new one. If you use a .app file does it work?

Can you create an issue on the github repo for appium-xcuitest-driver ? That should get fixed.

Hi @jonahss, issue is on its way.

But unfortunately I cannot try it with the .app file or provide any further details (e.g. log outputs) before next week, because right now I have no access to the machine that we were testing on.

Hi @Jander and @jonahss , Just want to check if there is any success with the appium-xcuitest-driver .

1 Like

Oh yes there is much success. Weā€™re still working on getting it all ship-shape to work easily with no modifications. If you look at the repo, youā€™ll see that @isaac has been very busy with it lately. Seems like weā€™re on track to have it published way ahead of the ios 10 release.

2 Likes

Thanks for the update

Hi @jonahss !

I just want to ask if there any news regarding ā€œGetting existing automation to run with new appium-xcuitest-driverā€. I also want to try the new webdriver for our regression executions. Unfortunately, I am still not able to run a existing automation run with appium-xcuitest-driver.

Are you able to give me an update, or a short how to?

Thanks!

Mario

Hi it is very good news that you already work on xcuitest.
Do you guys, work on java-client for appium-xcuitest-driver?
Thanks

see https://github.com/appium/java-client/pull/460 which states that ā€œThe new AutomationName was added. IOS_XCUI_TEST. It is needed for the further development.ā€ so at least some preparation have been done already.

1 Like

Thank you @rompic.
I will follow the link.

Hi Jander, do you have any specific steps you can share regarding what you followed please? ā€¦ Attempting to see what I can get working but a bit unsure on step 3.

Thanks

Hi @Christopher_Roberts,

what I did in step 3 was just a quick hack in order to get it running.

I changed the appium.js file inside the Appium package (in the build subfolder) and simply returned the WebDriverAgentDriver instead of the IosDriver. I have added a new variable in analogy to the IosDriver (around line 40)ā€¦

var _appiumXCUITestDriver = require('appium-xcuitest-driver');

ā€¦ and returned it, if the platform name ist ā€œiosā€ (around line 105).

  if (caps.platformName.toLowerCase() === 'ios') {
    // return _appiumIosDriver.IosDriver;
    return _appiumXCUITestDriver.WebDriverAgentDriver;
  }

Hope it helpsā€¦

Thanks Jander will give it a go.

is it worked for you? how i can run the tests written on java client?

the execution stopped at creating appiumDriver.

did you find a solution?

@menypeled Appium internally does it in latest Appium 1.6 version