@@ -29,8 +29,8 @@ def test_amazon_book_search_001():
2929
3030 with allure .step ("Select the categories as books in the search dropdown" ):
3131 AmazonHomePage .select_category_drop_down (static_variable .static_value_for ("category" ))
32- assert (AmazonHomePage .get_selected_category () ==
33- static_variable . static_value_for ( "category" )), "Category is not selected properly"
32+ assert (AmazonHomePage .get_selected_category () == static_variable . static_value_for ( "category" )),\
33+ "Category is not selected properly"
3434
3535 with allure .step ("Search for the text which is needed in this" ):
3636 search_text = static_variable .static_value_for ("search_text" )
@@ -86,13 +86,20 @@ def test_amazon_book_search_001():
8686 assert (res != - 1 ), "Delivery Pin code is not set properly"
8787
8888 with allure .step ("Store the UI details in the dynamic dictionary" ):
89+ AmazonProductPage .amazon_product_title .scroll_to_locator ()
8990 ui_dynamic_data ["amazon_product_title" ] = AmazonProductPage .amazon_product_title .texts_as_string ()
91+ AmazonProductPage .amazon_product_byline_info .scroll_to_locator ()
9092 ui_dynamic_data ["amazon_product_byline_info" ] = AmazonProductPage .amazon_product_byline_info .texts_as_string ()
93+ AmazonProductPage .amazon_product_formats .scroll_to_locator ()
9194 ui_dynamic_data ["amazon_product_formats" ] = AmazonProductPage .amazon_product_formats .texts_as_string ()
95+ AmazonProductPage .amazon_product_detail_description .scroll_to_locator ()
9296 ui_dynamic_data ["amazon_product_detail_description" ] = AmazonProductPage .\
9397 amazon_product_detail_description .texts_as_string ()
98+ AmazonProductPage .amazon_product_offers .scroll_to_locator ()
9499 ui_dynamic_data ["amazon_product_offers" ] = AmazonProductPage .amazon_product_offers .texts_as_string ()
100+ AmazonProductPage .amazon_product_description .scroll_to_locator ()
95101 ui_dynamic_data ["amazon_product_description" ] = AmazonProductPage .amazon_product_description .texts_as_string ()
102+ AmazonProductPage .amazon_product_details .scroll_to_locator ()
96103 ui_dynamic_data ["amazon_product_details" ] = AmazonProductPage .amazon_product_details .texts_as_string ()
97104
98105 with allure .step ("Compare the dynamic value from UI with the stored file" ):
0 commit comments