Skip to content

Commit

Permalink
Allow Ruby To handle both 'Element' and 'element-6066-11e4-a52e-4f735…
Browse files Browse the repository at this point in the history
…466cecf' keys when sending and recieving elements
  • Loading branch information
AutomatedTester committed Mar 3, 2015
1 parent 230ecb9 commit 3bef150
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rb/lib/selenium/webdriver/common/bridge_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def unwrap_script_result(arg)
end

def element_id_from(id)
id['ELEMENT']
id['ELEMENT'] or id['element-6066-11e4-a52e-4f735466cecf']
end

def parse_cookie_string(str)
Expand Down
7 changes: 5 additions & 2 deletions rb/lib/selenium/webdriver/common/element.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def send_keys(*args)
#
# 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.
#

Expand Down Expand Up @@ -272,7 +272,10 @@ def to_json(*args)
#

def as_json(opts = nil)
{ :ELEMENT => @id }
{
:ELEMENT => @id,
"element-6066-11e4-a52e-4f735466cecf" => @id
}
end

private
Expand Down

0 comments on commit 3bef150

Please sign in to comment.