Created
April 23, 2012 21:00
-
-
Save endeepak/2473813 to your computer and use it in GitHub Desktop.
AndroidDriver Bug : sendKeys() doesn't release shift key on typing uppercase characters followed by number
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tested With | |
# android-server-2.21.0.apk | |
# selenium-dotnet-2.21.0 | |
# selenium-webdriver (2.21.2) Gem | |
require "rubygems" | |
require "selenium-webdriver" | |
driver = Selenium::WebDriver.for(:remote, :url => "http://localhost:8080/wd/hub", :desired_capabilities => Selenium::WebDriver::Remote::Capabilities.android) | |
driver.navigate.to "http://www.google.com" | |
element = driver.find_element(:name, 'q') | |
search_term = "F1" | |
element.send_keys search_term | |
sleep 5 | |
element = driver.find_element(:name, 'q') | |
value = element.attribute("value") | |
raise "Expected #{value} to equal #{search_term}" if value != search_term | |
# Fails with :Expected F! to equal F1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment