UI automation using python and appium - Unable to launch WebDriverAgent

342 Views Asked by At

I am trying to open and login to the yelp app on an Iphone 7 plus using appium and python. Here is the code that I have

device_name = "iPhone 7 Plus"
udid = "XXXXXX"

driver = webdriver.Remote(
    command_executor='http://127.0.0.1:4723/wd/hub',
    desired_capabilities={
        'bundleId': "com.yelp.yelpiphone",
        'platformName': 'iOS',
        'deviceName': device_name,
        'udid': udid,
        'automationName': 'XCUITest',
        'platformVersion': '11.1'
    }
)

But the app does not open and I get the following error on the Appium server

[MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". 
Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. 
Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
2

There are 2 best solutions below

0
On

So if you visit the page you get in stacktrace you will find that most often the problem is related to not signed or incorrectly signed app.

This is the problem you most likely won't face running on emulator, so if you still want to run on real device follow the instructions to fix this.

And if you want to run on real devices you must provide xcodeConfigFile capability, check here what to include there.

0
On

This is what i did to get it resolved , i assume you have correct signing id

1) go to WebdriverAgentLib>Signing in section , uncheck and check Automatic Signin again select the correct dev id in drop down

2) go to WebdriverAgentRunner>Signing in Section, uncheck and check Automatic Signin again select the correct dev id in drop down

3)go to Keychain access and remove any expired certificate

4)build again