Created
March 3, 2015 14:45
-
-
Save AutomatedTester/77acaf297e46a8694a2d to your computer and use it in GitHub Desktop.
Handle the new Element key in ruby
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
| diff --git a/rb/lib/selenium/webdriver/common/bridge_helper.rb b/rb/lib/selenium/webdriver/common/bridge_helper.rb | |
| index ad3afd1..982fcd5 100644 | |
| --- a/rb/lib/selenium/webdriver/common/bridge_helper.rb | |
| +++ b/rb/lib/selenium/webdriver/common/bridge_helper.rb | |
| @@ -25,7 +25,7 @@ module Selenium | |
| end | |
| def element_id_from(id) | |
| - id['ELEMENT'] | |
| + id['ELEMENT'] or id['element-6066-11e4-a52e-4f735466cecf'] | |
| end | |
| def parse_cookie_string(str) | |
| diff --git a/rb/lib/selenium/webdriver/common/element.rb b/rb/lib/selenium/webdriver/common/element.rb | |
| index e948e27..a0d25b8 100644 | |
| --- a/rb/lib/selenium/webdriver/common/element.rb | |
| +++ b/rb/lib/selenium/webdriver/common/element.rb | |
| @@ -133,7 +133,7 @@ module Selenium | |
| # | |
| # Note that the events fired by this event may not be as you'd expect. In particular, we don't | |
| # fire any keyboard or mouse events. If you want to ensure keyboard events are | |
| - # fired, consider using #send_keys with the backspace key. To ensure you get a change event, | |
| + # fired, consider using #send_keys with the backspace key. To ensure you get a change event, | |
| # consider following with a call to #send_keys with the tab key. | |
| # | |
| @@ -272,7 +272,10 @@ module Selenium | |
| # | |
| def as_json(opts = nil) | |
| - { :ELEMENT => @id } | |
| + { | |
| + :ELEMENT => @id, | |
| + "element-6066-11e4-a52e-4f735466cecf" => @id | |
| + } | |
| end | |
| private |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment