@@ -10,37 +10,29 @@ def test_case():
1010 return "118802"
1111
1212
13- FACEBOOK_URL = "https://www.facebook.com/"
14- AMAZON_URL = "https://www.amazon.com/"
15- YOUTUBE_URL = "https://www.youtube.com/"
13+ @pytest .fixture ()
14+ def use_profile ():
15+ return "theme_change"
16+
1617
17- WEBSITES = [ FACEBOOK_URL , AMAZON_URL ]
18+ ETSY_URL = "https://www.etsy.com/"
1819
1920
2021def test_the_website_opened_in_new_tab_is_present_in_history_menu (driver : Firefox ):
2122 """
22- C118802 - Verify that the website opened in new tab is displayed in the Toolbar History submenu on top of the
23+ C118802 - Verify that the website opened in new tab is displayed in Hamburger Menu, History section, on top of the
2324 list
2425 """
25-
26- for url in WEBSITES :
27- GenericPage (driver , url = url ).open ()
28-
26+ # Instantiate objects
2927 tabs = TabBar (driver )
28+ page = GenericPage (driver , url = ETSY_URL )
29+ panel = PanelUi (driver )
3030
31- tabs .new_tab_by_button ()
32- tabs .wait_for_num_tabs (2 )
33- tabs .switch_to_new_tab ()
34-
35- page = GenericPage (driver , url = YOUTUBE_URL )
36- page .open ()
37- page .url_contains ("youtube" )
38-
39- panel_ui = PanelUi (driver )
40- panel_ui .open ()
41- panel_ui .open_history_menu ()
31+ # Open a new tab, switch to it and verify is the url contains the desired domain
32+ tabs .open_web_page_in_new_tab (page , 2 )
33+ page .url_contains ("etsy" )
4234
43- # Verify YouTube is present in the history menu and is on top of the list as the most recent website visited
44- panel_ui . expect_element_attribute_contains (
45- "recent-history-content" , "value" , "YouTube"
46- )
35+ # Verify Etsy is present in the Hamburger Menu, History section and is on top of the list as the most recent
36+ # website visited
37+ panel . open_history_menu ()
38+ panel . expect_element_attribute_contains ( "recent-history-content" , "value" , "Etsy" )
0 commit comments