Skip to content

Commit 6ed85d7

Browse files
committed
add wait in order to make this test reliable
1 parent f6ae0ad commit 6ed85d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/functional/ios/ios/device_test.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ def test_image_element
3737
el = @@driver.find_element :accessibility_id, 'Buttons'
3838
@@driver.save_element_screenshot el, 'test/functional/data/test_ios_button.png'
3939

40-
image_element = @@driver.find_element_by_image AppiumLibCoreTest.path_of('test/functional/data/test_ios_button.png')
40+
# sometimes animation affects here
41+
image_element =
42+
@@core.wait { @@driver.find_element_by_image AppiumLibCoreTest.path_of('test/functional/data/test_ios_button.png') }
4143

4244
assert image_element.inspect
4345
assert image_element.hash

0 commit comments

Comments
 (0)