Skip to content

Commit 9439031

Browse files
committed
add scrolling for ios
1 parent 6551329 commit 9439031

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/functional/ios/webdriver/w3c_actions_test.rb

+12
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@ def test_tap
2424
rect = el.rect
2525
@@driver.action.click_and_hold(el).move_to_location(rect.x, rect.y + 500).release.perform
2626
end
27+
28+
def test_scroll
29+
el = @@core.wait { @@driver.find_element(:accessibility_id, 'Controls') }
30+
@@driver.action.click(el).perform
31+
32+
while
33+
el = @@core.wait { @@driver.find_element(:xpath, "//XCUIElementTypeStaticText[@name='Style Default']/parent::*") }
34+
visibility = el.visible
35+
break if visibility == "true"
36+
@@driver.execute_script('mobile: scroll', direction: 'down')
37+
end
38+
end
2739
end
2840
end
2941
end

0 commit comments

Comments
 (0)