xcodeseleniumappiumios-simulatorios-ui-automation

Not able to launch safari browser in IOS Simulator , getting blank screen with a message "Let's browse" but nothing is loaded then


I am trying to run mobile web appium scripts in iOS Simulator . I used the below Desired capabilities in my code .

       DesiredCapabilities caps = new DesiredCapabilities();
                        caps.setCapability("platformName", "iOS");
                        caps.setCapability(CapabilityType.BROWSER_NAME, "safari");
                        caps.setCapability("platformVersion", "10.3");
                        caps.setCapability("deviceName", "iPhone 7");
                        caps.setCapability("automationName", "XCUITest");
                         try {
                            driver =new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"),caps);
                            driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);

                        } catch (MalformedURLException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                        }

                    }
    driver.get("https://shopping.google.com");

But i am getting a black white screen with a text as "Let's browser " and the execution gets stuck until I kill the session . Anythoughts on this ? How to fix it


Solution

  • I have updated my simulator version to 12.2 and mentioned the correct name in desired capabilities , this resolved my problem

     DesiredCapabilities caps = new DesiredCapabilities();
                    caps.setCapability("platformName", "iOS");
                    caps.setCapability(CapabilityType.BROWSER_NAME, "safari");
                    caps.setCapability("platformVersion", "12.2");
                    caps.setCapability("deviceName", "iPhone 8 Plus");
                    caps.setCapability("automationName", "XCUITest");
    
                     try {
                        driver =new RemoteWebDriver(new URL(prop.getProperty("AppiumurlPort")),caps);
                        driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
    
                    } catch (MalformedURLException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }