Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: call function result missing 'value'
Asked Answered
L

2

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("[email protected]")

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

Lackluster answered 21/12, 2018 at 10:53 Comment(3)
Can you check whether port is referring the different server or the URL is proper?Gerhan
every thing is fine. the issue is with sendkeys i'm able to perform click on buttons and linksLackluster
check the email field whether it can be enabled on click. Because human action clicks then send the keys. Automation just sends the keys.Gerhan
L
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

Lackluster answered 26/12, 2018 at 14:16 Comment(0)
V
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

Villatoro answered 21/12, 2018 at 11:45 Comment(5)
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");Lackluster
outside folder where chromedriver 2.45 located, try run where chromedriver in CMDVillatoro
its Powershell command, then try this D:\Eclipse\chromedriver.exe --version and also try replace double \` with /`Villatoro
last try :D print the property System.out.println(System.getProperty("webdriver.chrome.driver"));Villatoro
it display the same path what i set.Lackluster
L
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

Lackluster answered 26/12, 2018 at 14:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.