2

I'm automating a web app in chrome browser in Android Mobile. I've ADV with version 7.0

I'm trying to send user name for login using below code -

driver = new AppiumDriver<WebElement>(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
driver.get("https://site-url/");
driver.findElement(By.id("email")).sendKeys("myemailid@gmail.com")

It throws below exception -

Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: call function result missing 'value' (Session info: chrome=71.0.3578.99) (Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 0 milliseconds

Note: please don't mark it as duplicate. solution from below references are not working for me.

  1. org.openqa.selenium.WebDriverException: unknown error: call function result missing 'value'

  2. Selenium WebDriverException: unknown error: call function result missing 'value' while calling sendkeys method

I'm using latest chrome version i.e. 71 and chromedriver 2.45 . It doesn't seems a compatibility issue.

Observation : chromedriver version 2.45 used to set property but it shows chromedriver=2.33.506120 in exception

Wasiq Bhamla
  • 949
  • 1
  • 7
  • 12
NarendraR
  • 7,577
  • 10
  • 44
  • 82

2 Answers2

0

I want to make it comment but to make it clear I write it here. Yes it duplicate above post, see the log

(Session info: chrome=71.0.3578.99)

(Driver info: chromedriver=2.33.506120

You are using chromedriver 2.33 that for Chrome v60-62 then

I'm using latest chrome version i.e. 61 and chromedriver 2.45 . It doesn't seems a compatibility issue.

ChromeDriver 2.45 is for Chrome v70-72

solution: see download page for other compatibility and download

ewwink
  • 18,382
  • 2
  • 44
  • 54
  • Hey. I don't know from where it is taking `chromedriver=2.33.506120` . I have downloaded 2.45 and configured the path in `System.setProperty("webdriver.chrome.driver", "D:\\Eclipse\\chromedriver.exe");` – NarendraR Dec 21 '18 at 12:00
  • outside folder where chromedriver 2.45 located, try run `where chromedriver` in CMD – ewwink Dec 21 '18 at 12:04
  • its Powershell command, then try this `D:\Eclipse\chromedriver.exe --version` and also try replace double `\\` with `/` – ewwink Dec 21 '18 at 12:10
  • last try :D print the property `System.out.println(System.getProperty("webdriver.chrome.driver"));` – ewwink Dec 21 '18 at 12:17
  • it display the same path what i set. – NarendraR Dec 24 '18 at 08:21
0

This seems default Appium's chromedriver.exe issue in my case as it was taking chromedriver=2.33.506120 by default even i have set 2.45 version. following workaround resolved my issue.

Prerequisites Should have compatible chromedriver.exe version with the chrome version installed in device/emulator

setting chromedriver.exe path in Appium using System.setProperty("webdriver.chrome.driver", "D:\\Eclipse\\chromedriver.exe"); won't work

Use following ways to set chromedriver path in Appium:

  1. Using DesiredCapabilities e.g.

    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability("platformName", "Android");
    capabilities.setCapability("deviceName", "emulator-5554 (9)");
    capabilities.setCapability("platformVersion", "9");
    capabilities.setCapability("browserName", "Chrome");
    capabilities.setCapability("noReset", true);
    capabilities.setCapability("chromedriverExecutable", "D:\\chromedriver_win32_2.45\\chromedriver.exe");
    
  2. Provide chromedriver.exe path while start Appium Server. Refer below snap

    enter image description here

NarendraR
  • 7,577
  • 10
  • 44
  • 82