Reputation: 413
I am using Appium with Selenium WebDriver for automating my web application(having SSL certificate with https in the application url). i am using below code for IPad Simulator.
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME, "iOS");
capabilities.setCapability(CapabilityType.VERSION, "6.1");
capabilities.setCapability(CapabilityType.PLATFORM, "Mac");
capabilities.setCapability("device", "iPad");
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
capabilities.setCapability(CapabilityType.SUPPORTS_JAVASCRIPT, true);
//Create an instance of RemoteWebDriver and connect to the Appium server.
driver = new RemoteWebDriver(new URL("http://localhost:4723/wd/hub"), capabilities);
But still when i execute my automation script it is not able to open the application url in the IPad simulator.
Can anyone please help me in how to solve this issue.
Thanks in Advance!!
Upvotes: 1
Views: 1859
Reputation: 1054
If you are using Appium 1.0+, a number of changes needs to be done with your DesiredCapabilities :
Please match your cap sets with below:
Few Important Points: Double check the IP & PORT on which Appium server started and mention the same while passing to RemoteWebDriver.
public void setUp() throws Exception
{
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName", "iPhone Simulator");
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("platformVersion", "7.1");
capabilities.setCapability("browserName", "safari");
driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"),
capabilities);
}
Upvotes: 2
Reputation: 3146
A few corrections to your DesiredCapabilities
:
Safari
iOS
RemoteWebDriver
be http://0.0.0.0:4723/wd/hub
?Please review the desired capabilities spec
And after you make those corrections, if you try going to http://www.google.com
, does it work?
Upvotes: 0