org.openqa.selenium.WebDriverException:未知错误:调用函数结果缺少“值" [英] org.openqa.selenium.WebDriverException: unknown error: call function result missing 'value'

查看:27
本文介绍了org.openqa.selenium.WebDriverException:未知错误:调用函数结果缺少“值"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

发送键不起作用.请帮我解决这个问题..

Sendkeys not working. Please help me to resolve this..

WebElement username = driver.findElement(By.xpath("//*[@id='username']"));      
username.sendKeys("123456");

控制台:

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

  (Session info: chrome=65.0.3325.31)
  (Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 6.1.7601 SP1 x86) 
(WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds

Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'NEW-PC', ip: '192.168.0.103', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_161'

司机信息:

org.openqa.selenium.chrome.ChromeDriver

Capabilities {acceptSslCerts: true, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.33.506120 (e3e53437346286..., userDataDir: C:UsersNEWAppDataLocal...}, cssSelectorsEnabled: true, databaseEnabled: false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 65.0.3325.31, webStorageEnabled: true}

推荐答案

我看到了同样的问题.该问题仅在使用 Chrome 65(当前:dev 频道)时出现.使用 Chrome 64(稳定版和 Beta 版)一切正常.

I was seeing the same issue. The problem only appears when using Chrome 65 (currently: dev channel). With Chrome 64 (both stable channel and beta channel) everything worked fine.

事实证明我安装了一个旧的 chromedriver.具体来说,我使用 chrome=65.0.3325.51chromedriver=2.29.461585.运行 npm install -g chromedriver 将 chromedriver 撞到 2.35.528157,现在问题解决了.希望这会有所帮助!

It turns out I had an old chromedriver installed. Specifically, I was using chrome=65.0.3325.51 with chromedriver=2.29.461585. Running npm install -g chromedriver bumped chromedriver to 2.35.528157 and now the problem is solved. Hope this helps!

TL;DR:运行 npm install -g chromedriver

这篇关于org.openqa.selenium.WebDriverException:未知错误:调用函数结果缺少“值"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆