@@ -34,7 +34,7 @@ def __init__(self, driver: Firefox, **kwargs):
34
34
super ().__init__ (driver , ** kwargs )
35
35
self .driver = driver
36
36
37
- # number of tabs to reach the country tab
37
+ # Number of tabs to reach the country tab
38
38
TABS_TO_COUNTRY = 6
39
39
TABS_TO_SAVE_CC = 5
40
40
@@ -49,7 +49,7 @@ def __init__(self):
49
49
HTTPS_ONLY_STATUS = HttpsOnlyStatus ()
50
50
51
51
# Function Organization
52
- ## Search and Settings
52
+ # Search and Settings
53
53
def search_engine_dropdown (self ) -> Dropdown :
54
54
"""Returns the Dropdown region for search engine prefs"""
55
55
return Dropdown (
@@ -120,11 +120,11 @@ def select_content_and_action(self, content_type: str, action: str) -> BasePage:
120
120
121
121
def get_history_menulist (self ) -> WebElement :
122
122
"""
123
- Gets the webelement for the list of history items that appear in about:preferences
123
+ Gets the web element for the list of history items that appear in about:preferences
124
124
"""
125
125
return self .get_element ("history_menulist" )
126
126
127
- ## Payment and Address Management
127
+ # Payment and Address Management
128
128
def verify_cc_json (
129
129
self , cc_info_json : dict , credit_card_fill_obj : CreditCardBase
130
130
) -> BasePage :
@@ -384,7 +384,7 @@ def extract_address_data_from_saved_addresses_entry(
384
384
telephone = util .normalize_regional_phone_numbers (fields .get ("tel" ), region ),
385
385
)
386
386
387
- ## UI Navigation and Iframe Handling
387
+ # UI Navigation and Iframe Handling
388
388
def get_saved_payments_popup_iframe (self ) -> WebElement :
389
389
"""
390
390
Returns the iframe object for the dialog panel in the popup
@@ -457,7 +457,7 @@ def get_password_exceptions_popup_iframe(self) -> WebElement:
457
457
iframe = self .get_element ("browser-popup" )
458
458
return iframe
459
459
460
- ## Data Extraction and Processing
460
+ # Data Extraction and Processing
461
461
def set_country_autofill_panel (self , country : str ) -> BasePage :
462
462
"""Sets the country value in the autofill view"""
463
463
select_country = Select (self .driver .find_element (By .ID , "country" ))
@@ -530,8 +530,8 @@ def get_manage_data_site_element(self, site: str) -> WebElement:
530
530
element = self .get_element ("manage-cookies-site" , labels = [site ])
531
531
return element
532
532
533
- ## Utility Functions
534
- def import_bookmarks (self , browser_name : str ) -> BasePage :
533
+ # Utility Functions
534
+ def import_bookmarks (self , browser_name : str , platform ) -> BasePage :
535
535
"""
536
536
Press the import browser data button
537
537
"""
@@ -556,6 +556,13 @@ def import_bookmarks(self, browser_name: str) -> BasePage:
556
556
tries += 1
557
557
558
558
self .click_on ("migration-import-button" )
559
+ sleep (1 )
560
+
561
+ # On Windows, Tab to and use the Skip button
562
+ if platform .lower ().startswith ("win" ):
563
+ for _ in range (3 ):
564
+ self .actions .send_keys (Keys .TAB ).perform ()
565
+ self .actions .send_keys (Keys .RETURN ).perform ()
559
566
560
567
# There are two messages that indicate a successful migration
561
568
self .wait .until (
0 commit comments