我在使用 selenium 从 firefoxdriver 切换到 chromedriver 时遇到了问题,它在 FF 中运行良好,但现在当我尝试清除日期输入字段时出现此错误:
Caused by: org.openqa.selenium.InvalidElementStateException: Element must be user-editable
in order to clear it. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 38 milliseconds
Build info: version: '2.31.0', revision: '1bd294d185a80fa4206dfeab80ba773c04ac33c0',
time: '2013-02-27 13:51:26'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8.2', java.version:
'1.6.0_41'
Session ID: cb5a1b7e5f4abc4f2e56e2fe284a9dc3
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=MAC, chrome.chromedriverVersion=26.0.1383.0, acceptSslCerts=false,
javascriptEnabled=true, browserName=chrome, rotatable=false, locationContextEnabled=false,
version=25.0.1364.160, cssSelectorsEnabled=true, databaseEnabled=false,
handlesAlerts=true, browserConnectionEnabled=false, nativeEvents=true,
webStorageEnabled=true, applicationCacheEnabled=false, takesScreenshot=true}]
blah blah...
我尝试将 contenteditable 属性添加到我的输入字段但没有运气:
<input type="date" contenteditable="true" required="required" placeholder="YYYY-MM-dd" />
我不确定是否应该报告或在哪里报告,但我发现相关项目中的这些问题有些相似:
https://github.com/jnicklas/capybara/issues/554
https://github.com/Behat/MinkSelenium2Driver/pull/29
与此同时,有什么建议可以解决这个错误吗?
任