Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IPhone real device automation environment setup

Tags:

I am trying to write script using Java and Selenium. Using Appium tool for automation. I finished testing web app on simulator. I want to know if it is possible to run test script by connecting the real iPhone device to MAC through Wifi. If yes, will xcode be able to detect the device? If no, is there any software out there which can help me achieve this.
I know there is option of connecting using USB but I am dealing with remote MAC machine.

like image 801
amaurya123 Avatar asked Jan 04 '17 07:01

amaurya123


1 Answers

Now if I am understanding your problem correctly - you want to run test on real device without physically connecting to MAC.

    **Answers:**

    1. There is no way, you can run test on Real Device without physically connecting it to Mac with an Xcode.
    2. Xcode can't detect any iPhone via wifi.
    3. There is one way to run test on iPhone without physical connection, if you want to run tests on mobile website that is Safari:
        A. **ONE TIME SETUP** You need to install iWeb Driver (app) in iPhone once via Xcode. This is a deprecated way though. If you want this, I'll upload the iWeb Driver source code on github, you can download and install further.
        B. Now before running test, you need to launch the iWeb Driver (app) manually on device, once you run this, it will flash an a URL on app.
        C. Use this url in Remote Webdriver like:

  DesiredCapabilities cap = new DesiredCapabilities();
                cap.setCapability(CapabilityType.PLATFORM, DesiredCapabilities.iphone());

WebDriver iphoneDriver = new RemoteWebDriver(new URL(iphoneIp), cap);
    and then use this driver just like other and run your tests.
like image 167
Pankaj Kumar Katiyar Avatar answered Oct 11 '22 14:10

Pankaj Kumar Katiyar