CC: Jonathan Lipps, Isaac Murchie
Dear Appium Followers,
I have been working hard to automate a simple case in chrome but failing to achieve that..
_______________________________________
Environment:
Laptop OS : MAC OS X 10.9.2
Appium Version : 1.2.2 ( MAC OS X ver)
Chrome Driver : 2.10
chrome apk: 35
Selenium- Java Binding : 2.42.2
Android Emulator: 4.4.2 (API 19)
IDE : Kepler Service Release 2
Project: Java Project
________________________________________
Steps to reproduce the Issue:
- Appium Server Launch ( Appium IDE —> Clicking Launch )
- Executing as a Java application
- Chrome Browser Launched —> Junk value (Data is displayed in address bar)
- Chrome Browser is crashing when url is about to load
________________________________________
Logs:
- Starting ChromeDriver (v2.10.267517) on Only local connections are allowed.Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: cannot find Chrome binary
Sometimes I get this, ( Depending on the l path of the chromdriver I keep)
- Exception in thread "main” java.lang.IllegalStateException: The driver executable does not exist: /Users/tcs/Applications/Appium.app/Contents/Resources/node_modules/appium/build/chromedriver/mac/chromedriver
________________________________________
NOTE
- I’m sure ChromeDriver is available in that path
- If I pass 0.0.0.0:9515, Then it throws port is not available so I’m passing 4723
- Very Important: If I remove WebDriver driver1 = new ChromeDriver(); Then its loading url ( Expectation is achieved here but not clicking on web elements
________________________________________
My Code:
public class Test1 {
public static void main(String[] args) throws MalformedURLException {
WebDriver driver;
System.setProperty("webdriver.chrome.driver","/Users/username/Applications/Appium.app/Contents/Resources/node_modules/appium/build/chromedriver/mac/chromedriver");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName","Android");
capabilities.setCapability("platformVersion","4.4.2");
capabilities.setCapability("deviceName","Android Emulator");
capabilities.setCapability("browserName","Chrome");
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
WebDriver driver1 = new ChromeDriver();
driver1.findElement(By.id("gbqfif")).click();
driver1.quit();
}
}
________________________________________
I have been blocked here since a week by spending lot of hours/day. Kindly help me to take complete my project using Appium.
I have been working in Appium since 8months and very successful in automating native apps…
________________________________________ THE END ___________________________