Skip to content

Commit 0fe5bf1

Browse files
authored
test: update a test (#432)
* use id to make test break * remove a comment line
1 parent b83aa2f commit 0fe5bf1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/unit/android/device/w3c/commands_test.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -473,15 +473,15 @@ def test_get_battery_info
473473

474474
def test_search_element_child_element
475475
stub_request(:post, "#{SESSION}/element")
476-
.with(body: { using: 'accessibility id', value: 'example' }.to_json)
476+
.with(body: { using: 'id', value: 'example' }.to_json)
477477
.to_return(headers: HEADER, status: 200, body: { value: { ELEMENT: 'element_id_parent' },
478478
sessionId: SESSION, status: 0 }.to_json)
479479
stub_request(:post, "#{SESSION}/element/element_id_parent/element")
480-
.with(body: { using: 'accessibility id', value: 'example2' }.to_json)
480+
.with(body: { using: 'id', value: 'example2' }.to_json)
481481
.to_return(headers: HEADER, status: 200, body: { value: { ELEMENT: 'element_id_children' },
482482
sessionId: SESSION, status: 0 }.to_json)
483483

484-
@driver.find_element(:accessibility_id, 'example').find_element(:accessibility_id, 'example2')
484+
@driver.find_element(:id, 'example').find_element(:id, 'example2')
485485

486486
assert_requested(:post, "#{SESSION}/element", times: 1)
487487
assert_requested(:post, "#{SESSION}/element/element_id_parent/element", times: 1)

0 commit comments

Comments
 (0)