File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ def test_image_comparison_get_images_result
85
85
def test_image_element
86
86
skip 'Requires `npm install -g appium opencv4nodejs`' unless `npm list -g opencv4nodejs` . include? 'opencv4nodejs'
87
87
88
- @@driver . update_settings ( { fixImageTemplateScale : true } )
88
+ @@driver . update_settings ( { fixImageTemplateScale : true , getMatchedImageResult : true } )
89
89
90
90
el = @@driver . find_element :accessibility_id , 'Buttons'
91
91
@@driver . save_element_screenshot el , 'test/functional/data/test_ios_button.png'
@@ -97,6 +97,7 @@ def test_image_element
97
97
assert image_element . inspect
98
98
assert image_element . hash
99
99
assert image_element . ref =~ /\A appium-image-element-[a-z0-9\- ]+/
100
+ assert !image_element . visual . nil?
100
101
101
102
el_location = el . location
102
103
image_location = image_element . location
@@ -120,6 +121,11 @@ def test_image_element
120
121
121
122
assert @@driver . find_element :accessibility_id , 'Gray'
122
123
@@driver . back
124
+
125
+ @@driver . update_settings ( { fixImageTemplateScale : true , getMatchedImageResult : false } )
126
+ image_element =
127
+ @@core . wait { @@driver . find_element_by_image AppiumLibCoreTest . path_of ( 'test/functional/data/test_ios_button.png' ) }
128
+ assert_nil image_element . visual
123
129
end
124
130
125
131
def test_image_elements
You can’t perform that action at this time.
0 commit comments