Facing webdriverexception while automating iOS app using appium

public static WebDriver driver;
public static void main(String[] args) throws MalformedURLException, InterruptedException {
// TODO Auto-generated method stub

//File app = new File("/Users/qa/Desktop/QA Team /pankaj/mac/Boku.ipa");

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(“appium-version”, “1.5.1”);
capabilities.setCapability(“platformName”, “iOS”);
capabilities.setCapability(“platformVersion”, “9.3.1”);
capabilities.setCapability(“deviceName”, “iPhone 6”);
capabilities.setCapability(“udid”, “a87a03d1680a6cfd142829db9b01da43019b278f”);

 //capabilities.setCapability("app", app.getAbsolutePath());
 capabilities.setCapability("app","/Users/qa/Desktop/QA Team /pankaj/mac/Boku.ipa");
 //capabilities.setCapability("appPackage", "com.boku.sandbox");
 /*capabilities.setCapability("appActivity", "ui.activities.SplashActivity");
 capabilities.setCapability("appWaitActivity", "ui.activities.TutorialActivity");*/
 driver = new RemoteWebDriver(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);
 driver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);
 //capabilities.setCapability("appActivity", "ui.activities.LoginActivity");

}
}

Hi @jyotsaan,
Please share the error logs, also I see you are running your tests on real ios device,
Are you running ios_webkit_debug_proxy before running your tests?

no
and what is this?

Ok, i thought you were running your tests on mobile safari, you don’t need ios_webkit_debug_proxy if you are automating native applications,
I hope, you have all the pre-requisites for real ios device automation setup, like Apple developers ID and provisioning profile.
If not please go through this link: http://appium.io/slate/en/1.5/?java#appium-on-real-ios-devices
Also please share the error log, can’t help you much without the logs.

Dhruv_91

hello
I am not facing this issue right now

But i need one more help
I want to allow"App name" access your location while you the aappfrom my iphone so how can i handle this popup as i used inspector to get the xpath for allow button but am not able to click
I am getting Such exception:
Exception in thread “main” org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 51.18 second

Hi @jyotsaan,

Have you tried setting the following capability:
capabilities.SetCapability(“autoAcceptAlerts”, true);

when i am putting this line to my code i am unable to work with OTP concept means i am unable to senkeys to the OTP textfield

Can you tell me what is the error log?
Is it unable to find the element,
Also this OTP field, does it come after you click Yes on location pop-up?
Also please confirm, if you are able to handle the location pop-up

Dhruv_91
I am getting such exception:

Exception in thread “main” org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters. (WARNING: The server did not provide any stacktrace information)