@@ -25,18 +25,18 @@ def test_amazon_book_search_001():
2525 dynamic_variable = Var ("amazon_book_search_result_dynamic.yml" , "dynamic" )
2626
2727 with allure .step ("Initialize the driver and navigate to the url" ):
28- driver = Driver () # Initialize the driver. Driver configurations will be taken from the global_data.yml file
28+ driver = Driver () # Initialize the driver. Driver configurations will be taken from the global_data.yml file
2929 driver .get (static_variable .static_value_for ("url" ))
3030 assert (AmazonHomePage .is_home_page_displayed () is True ), "Amazon home page is not displayed"
3131
3232 with allure .step ("Select the categories as books in the search dropdown" ):
3333 AmazonHomePage .select_category_drop_down (static_variable .static_value_for ("category" ))
34- assert (AmazonHomePage .get_selected_category () == static_variable .static_value_for ("category" )), \
35- "Category is not selected properly"
3634
3735 with allure .step ("Search for the text which is needed in this" ):
3836 search_text = static_variable .static_value_for ("search_text" )
3937 AmazonHomePage .search_in_the_search_box (search_text )
38+ assert (AmazonHomePage .get_selected_category () == static_variable .static_value_for ("category" )), \
39+ "Category is not selected properly"
4040 assert (AmazonSearchResultPage .is_search_result_page_displayed () is True ), "Search result page is not displayed"
4141 assert (AmazonSearchResultPage .is_filter_set_in_head_liner (search_text ) is True ), "Searched text is not " \
4242 "displayed in the result page"
@@ -75,6 +75,7 @@ def test_amazon_book_search_001():
7575 AmazonSearchResultPage .select_a_product_from_search_result (static_variable .static_value_for ("select_product" ))
7676 assert (driver .window_handles_count () == 2 ), "New tab is not opened after clicking a product"
7777 driver .switch_to_new_tab ()
78+ driver .wait_till_page_loads (30 )
7879 assert (AmazonProductPage .is_product_page_displayed () is True ), "Product page is not displayed after selecting"
7980
8081 with allure .step ("Set the delivery pincode in the product page" ):
0 commit comments