0
と相互作用することはできませんではありませんそれはここでSelenium::WebDriver::Error::ElementNotVisibleError: Element is not currently visible and so may not be interacted with
セレンの要素は、現在、私はこのようなページを持っている目に見えるので、
をスローそのうちの一つの鍵は、私の運転指令です:
browser.browser.public_send(:textareas, :xpath => "//div[@class='CodeMirror']//textarea[@wrap='off']")[0].html
=> "<textarea autocapitalize=\"off\" autocorrect=\"off\" style=\"position: absolute; padding: 0px; width: 1px; height: 1em;\" wrap=\"off\"></textarea>"
[58] pry(#<CucuShift::DefaultWorld>)> browser.browser.public_send(:textareas, :xpath => "//div[@class='CodeMirror']//textarea[@wrap='off']")[1].html
=> "<textarea autocapitalize=\"off\" autocorrect=\"off\" style=\"position: absolute; padding: 0px; width: 1px; height: 1em;\" wrap=\"off\"></textarea>"
browser.browser.public_send(:textareas, :xpath => "//div[@class='CodeMirror']/descendant::textarea[@autocorrect='off']")[1].click
Selenium::WebDriver::Error::ElementNotVisibleError: Element is not currently visible and so may not be interacted with
from [remote server] file:///tmp/webdriver-profile20160801-26332-bu7605/extensions/[email protected]/components/command-processor.js:10092:in `fxdriver.preconditions.visible'
browser.browser.public_send(:textareas, :xpath => "//div[@class='CodeMirror']/descendant::textarea[@autocorrect='off']")[1].send_keys '1234'
Selenium::WebDriver::Error::ElementNotVisibleError: Element is not currently visible and so may not be interacted with
from [remote server] file:///tmp/webdriver-profile20160801-26332-bu7605/extensions/[email protected]/components/command-processor.js:10092:in `fxdriver.preconditions.visible'
最も奇妙なことは、これらのあまりに要素HTMLは同じです。
実際、CodeMirrorの問題です –