skip to Main Content

How to automate already installed ios Apps using Appium. I want to automate like whatsap ebay and other installed apps in my iphone using appium.

3

Answers


  1. You should be able to automate the app if you know the bundleId of the application. For WhatsApp the bundleId is net.whatsapp.WhatsApp

    If your Appium set up is correct and have python installed then, start an Appium Server and Run the sample python code. You can attach the session to the Appium inspector to inspect the elements.

    from appium import webdriver
    desired_caps = {}
    desired_caps['platformName'] = 'iOS'
    desired_caps['platformVersion'] = '12.4.6'
    desired_caps['name'] = 'Sample Test'
    desired_caps['deviceName'] = 'iPhone 6'
    desired_caps['udid'] = 'add_your_device_udid_here'
    desired_caps["bundleId"] = "net.whatsapp.WhatsApp"
    desired_caps["noReset"] = True
    desired_caps["newCommandTimeout"] = 50000
    driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
    
    Login or Signup to reply.
  2. You need to add bundle ID capability with existing capabilities.

            DesiredCapabilities caps = new DesiredCapabilities();
    
            caps.setCapability(MobileCapabilityType.UDID, "udid");
            caps.setCapability(MobileCapabilityType.PLATFORM_VERSION, "12.4");
            caps.setCapability(MobileCapabilityType.DEVICE_NAME, deviceName);
            caps.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
            caps.setCapability("unicodeKeyboard", true);
            caps.setCapability(MobileCapabilityType.AUTOMATION_NAME, "XCUITest");
            caps.setCapability(MobileCapabilityType.NO_RESET, true);
            caps.setCapability("bundleId", "com.company.appname");
            caps.setCapability("usePrebuiltWDA", true);
    
            IOSDriver<WebElement>  driver = new IOSDriver<WebElement>(new URL("http://127.0.0.1:4444/wd/hub"), caps)
    
    

    I have added UDID capability which is used for real device.

    Login or Signup to reply.
  3. this work for me

    {
      "automationName": "XCUITest",
      "platformName": "iOS",
      "deviceName": "iPhone",
      "udid": "...",
      "xcodeOrgId": "...",
      "platformVersion": "xx.y",
      "updatedWDABundleId": "com.facebook.WebDriverAgentRunner"
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search