Skip to content

Commit 3bef150

Browse files
author
AutomatedTester
committed
Allow Ruby To handle both 'Element' and 'element-6066-11e4-a52e-4f735466cecf' keys when sending and recieving elements
1 parent 230ecb9 commit 3bef150

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

rb/lib/selenium/webdriver/common/bridge_helper.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def unwrap_script_result(arg)
2525
end
2626

2727
def element_id_from(id)
28-
id['ELEMENT']
28+
id['ELEMENT'] or id['element-6066-11e4-a52e-4f735466cecf']
2929
end
3030

3131
def parse_cookie_string(str)

rb/lib/selenium/webdriver/common/element.rb

+5-2
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def send_keys(*args)
133133
#
134134
# Note that the events fired by this event may not be as you'd expect. In particular, we don't
135135
# fire any keyboard or mouse events. If you want to ensure keyboard events are
136-
# fired, consider using #send_keys with the backspace key. To ensure you get a change event,
136+
# fired, consider using #send_keys with the backspace key. To ensure you get a change event,
137137
# consider following with a call to #send_keys with the tab key.
138138
#
139139

@@ -272,7 +272,10 @@ def to_json(*args)
272272
#
273273

274274
def as_json(opts = nil)
275-
{ :ELEMENT => @id }
275+
{
276+
:ELEMENT => @id,
277+
"element-6066-11e4-a52e-4f735466cecf" => @id
278+
}
276279
end
277280

278281
private

0 commit comments

Comments
 (0)