Run the following script (Ruby):
require 'selenium-webdriver'
require 'minitest/autorun'
class TestContentEditable < MiniTest::Unit::TestCase
def setup
@driver = Selenium::WebDriver.for :firefox
@driver.get 'http://www.sceditor.com/'
iframe = @driver.find_element(:css, '.sceditor-container > iframe')
@driver.switch_to.frame(iframe)
end
def test_sending_keys_to_body
el = @driver.find_element(:css, 'body')
el.send_keys 'SOME TEXT'
assert_includes el.text, 'SOME TEXT'
end
def test_sending_keys_to_nested_element
el = @driver.find_element(:css, 'div')
el.send_keys 'SOME TEXT'
assert_includes el.text, 'SOME TEXT'
end
def teardown
@driver.quit
end
end
The first test passes but the second test fails. I would expect second to pass and
the keys sent to that element (i.e. to a place where "SCEditor" is shown).
Selenium version: 2.42
OS: Ubuntu 14.04
Browser: Firefox 30.0
Originally reported on Google Code with ID 7651
Reported by
botalov.andrey
on 2014-07-24 18:11:50