File tree Expand file tree Collapse file tree 2 files changed +45
-1
lines changed Expand file tree Collapse file tree 2 files changed +45
-1
lines changed Original file line number Diff line number Diff line change
1
+ import pytest
2
+ from selenium .webdriver import Firefox
3
+
4
+ from modules .browser_object_autofill_popup import AutofillPopup
5
+ from modules .page_object_autofill import AddressFill
6
+ from modules .util import Utilities
7
+
8
+
9
+ @pytest .fixture ()
10
+ def test_case ():
11
+ return "2888565"
12
+
13
+
14
+ def test_demo_ad_clear_address_fields (
15
+ driver : Firefox ,
16
+ region : str ,
17
+ address_autofill : AddressFill ,
18
+ util : Utilities ,
19
+ autofill_popup : AutofillPopup
20
+ ):
21
+ """
22
+ C2888565 - Verify clear functionality after selecting an entry from address fields
23
+ """
24
+ # Create fake data and fill it in
25
+ address_autofill .open ()
26
+ address_autofill_data = util .fake_autofill_data (region )
27
+ address_autofill .save_information_basic (address_autofill_data )
28
+
29
+ # Click the "Save" button
30
+ autofill_popup .click_doorhanger_button ("save" )
31
+
32
+ # List of field labels to be autofilled and verified
33
+ fields_to_test = [
34
+ "street-address" ,
35
+ "address-level2" ,
36
+ "address-level1" , # This will be skipped for DE/FR
37
+ "postal-code" ,
38
+ "country"
39
+ ]
40
+
41
+ # Loop through each field and perform the autofill test
42
+ for field in fields_to_test :
43
+ address_autofill .clear_and_verify (autofill_popup , field , address_autofill_data )
Original file line number Diff line number Diff line change 21
21
" test_demo_ad_yellow_highlight_address.py" ,
22
22
" test_demo_ad_clear_name_org.py" ,
23
23
" test_demo_ad_yellow_highlight_phone_email.py" ,
24
- " test_demo_ad_clear_name_org.py"
24
+ " test_demo_ad_clear_name_org.py" ,
25
+ " test_demo_ad_clear_address_fields.py"
25
26
]
26
27
}
You can’t perform that action at this time.
0 commit comments