Java – can I use appium – webdriver to run applications from a laptop (MAC) on a real device (iPhone)?

I have implemented appium to run my test cases on the iPhone / iPad simulator

Using the simulator:

capabilities.setCapability("device","iPhone Simulator");
capabilities.setCapability("app","Safari");

Now I'm trying to perform some tests using the iPhone web browser on a real device, so I set the UDID number

Using real devices:

capabilities.setCapability("device","75cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
capabilities.setCapability("app","Safari");

However, appium requires an absolute path to the application

I'm also trying to use appium GUI, and I have the same result I don't know if I can use appium to run iPhone applications on real devices If possible, can someone tell me which absolute path I need?

Sorry for my English

Thank you for your time

Solution

The absolute path is the file path of the application on the Mac. Appium will get and install the application before starting the test you are trying to run At present, the way people start using mobile safari to open and work is to use the absolute path of a program like Safari launcher, which can open mobile Safari for you After that, you can retrieve the WebView window handle in Safari and start running the regular webdriver command

This solution will be discussed in detail here I can confirm that it works, but from my testing experience, the time for all these components to work together is a little clumsy

As a reference, I believe these are the functions I use to start and run

capabilities.setPlatform(Platform.valueOf("MAC"));
capabilities.setBrowserName("iPhone");
capabilities.setCapability("app","/path/to/SafariLauncher.app");
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>