Test network problems in simulator launched by Appium XCUITest

175 views Asked by At

I have set of hardware devices in the test network(no internet connection) and have an iOS App that detects all the devices in the test network. Those devices can be seen in the App in iPhone or iPad after connecting to test network only.

I have developed a appium automation code in java and that launches the app in Simulators and displays the all hardware devices that are in test network. But whenever I run my code, Appium able to launch the App simulator but no hardware devices in the App are being displayed. Network settings showing 'NO wifi connection'. My Mac is connected to test network so simulator has to automatically connect to test network and show the hardware devices in the network.

Could any help me to get rid of this would be appreciated.

Code:

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName", "iPhone 6 Plus");
capabilities.setCapability("automationName", "XCUITest");
capabilities.setCapability("browserName","");
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("platformVersion", "10.0");
File app = new File("/Users/Shiva/Desktop/*****IAP.app");       
capabilities.setCapability("app", app.getAbsolutePath());
capabilities.setCapability("udid", deviceUDID());
capabilities.setCapability("sendKeyStrategy", "grouped");
capabilities.setCapability("realDeviceLogger", "/usr/local/lib/node_modules/deviceconsole/deviceconsole");
IOSDriver<MobileElement> driver = new IOSDriver<MobileElement>(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);

Thanks in advance.

0

There are 0 answers