猿问

org.openqa.selenium.WebDriverException:未知错误

Sendkeys不起作用。请帮我解决这个问题。


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:\Users\NEW\AppData\Local\...}, 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}


芜湖不芜
浏览 1648回答 3
3回答

心有法竹

我看到了同样的问题。仅在使用Chrome 65(当前:开发人员通道)时出现此问题。使用Chrome 64(稳定通道和Beta通道),一切正常。原来我安装了旧的chromedriver。具体来说,我用chrome=65.0.3325.51用chromedriver=2.29.461585。将npm install -g chromedriver撞色的chromedriver 运行到2.35.528157,现在问题已解决。希望这可以帮助!TL; DR:运行npm install -g chromedriver

幕布斯6054654

错误说明了一切: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 millisecondsBuild info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'  您的主要问题是所使用的二进制文件之间的版本兼容性,如下所示:您正在使用chromedriver = 2.33chromedriver = 2.33发行说明明确提到以下内容:支持Chrome v60-62您正在使用chrome = 65.0ChromeDriver v2.37发行说明明确提到以下内容:支持Chrome v64-66因此,ChromeDriver版本(v2.33)与Chrome浏览器版本(v65.0)之间存在明显的不匹配解升级ChromeDriver当前ChromeDriver v2.37水平。将Chrome版本保持在Chrome v65.x级别。(根据ChromeDriver v2.37发行说明)清理你的项目工作,通过你的IDE和重建仅需要依赖你的项目。在执行测试套件之前和之后,使用CCleaner工具清除所有操作系统琐事。如果您的基本Web客户端版本太旧,请通过Revo Uninstaller卸载它,并安装最新的GA和Web Client的发行版本。执行您的@Test。
随时随地看视频慕课网APP

相关分类

Java
我要回答