2017-01-04 16 views
5

Java ve Selenium kullanarak komut dosyası yazmaya çalışıyorum. Otomasyon için Appium aracını kullanma. Simülatörde web uygulamasını test ettim. Gerçek iPhone cihazını Wifi üzerinden MAC'a bağlayarak test komut dosyasını çalıştırmanın mümkün olup olmadığını bilmek istiyorum. Varsa, xcode cihazı tespit edebilecek mi? Hayır ise, bunu gerçekleştirmeme yardımcı olabilecek herhangi bir yazılım var mı?
USB kullanarak bağlanabilme seçeneği olduğunu biliyorum ancak uzak MAC makinesiyle uğraşıyorum.IPhone gerçek aygıt otomasyon ortamı kurulumu

cevap

4

Sorununuzu doğru bir şekilde anlıyorsanız - fiziksel olarak MAC'a bağlanmadan gerçek aygıtta test yapmak istiyorsunuz.

**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. 
İlgili konular