File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ def test_demo_ad_clear_tel_email(
25
25
address_autofill .open ()
26
26
address_autofill .fill_and_save (region )
27
27
28
- # List of field labels to be autofilled and verified
28
+ # List of field labels to be auto filled and verified
29
29
fields_to_test = ["email" , "tel" ]
30
30
31
31
# Loop through each field and perform the autofill test
Original file line number Diff line number Diff line change @@ -186,9 +186,16 @@ def verify_field_highlight(
186
186
else :
187
187
fields_to_actually_check = fields_to_test
188
188
189
- is_yellow_highlight = lambda rgb : (
190
- rgb [0 ] >= 250 and rgb [1 ] >= 250 and 180 < rgb [2 ] < 220
191
- )
189
+ def is_yellow_highlight (rgb_tuple ):
190
+ """
191
+ Returns True if the color tuple is bright yellow-ish.
192
+ """
193
+ if len (rgb_tuple ) == 3 :
194
+ r , g , b = rgb_tuple
195
+ else :
196
+ r , g , b , * _ = rgb_tuple
197
+
198
+ return (r >= 250 ) and (g >= 250 ) and (180 < b < 220 )
192
199
193
200
for field_name in fields_to_actually_check :
194
201
# Focus the field so the highlight is visible
You can’t perform that action at this time.
0 commit comments