@@ -29,8 +29,8 @@ def test_amazon_book_search_001():
29
29
30
30
with allure .step ("Select the categories as books in the search dropdown" ):
31
31
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"
34
34
35
35
with allure .step ("Search for the text which is needed in this" ):
36
36
search_text = static_variable .static_value_for ("search_text" )
@@ -86,13 +86,20 @@ def test_amazon_book_search_001():
86
86
assert (res != - 1 ), "Delivery Pin code is not set properly"
87
87
88
88
with allure .step ("Store the UI details in the dynamic dictionary" ):
89
+ AmazonProductPage .amazon_product_title .scroll_to_locator ()
89
90
ui_dynamic_data ["amazon_product_title" ] = AmazonProductPage .amazon_product_title .texts_as_string ()
91
+ AmazonProductPage .amazon_product_byline_info .scroll_to_locator ()
90
92
ui_dynamic_data ["amazon_product_byline_info" ] = AmazonProductPage .amazon_product_byline_info .texts_as_string ()
93
+ AmazonProductPage .amazon_product_formats .scroll_to_locator ()
91
94
ui_dynamic_data ["amazon_product_formats" ] = AmazonProductPage .amazon_product_formats .texts_as_string ()
95
+ AmazonProductPage .amazon_product_detail_description .scroll_to_locator ()
92
96
ui_dynamic_data ["amazon_product_detail_description" ] = AmazonProductPage .\
93
97
amazon_product_detail_description .texts_as_string ()
98
+ AmazonProductPage .amazon_product_offers .scroll_to_locator ()
94
99
ui_dynamic_data ["amazon_product_offers" ] = AmazonProductPage .amazon_product_offers .texts_as_string ()
100
+ AmazonProductPage .amazon_product_description .scroll_to_locator ()
95
101
ui_dynamic_data ["amazon_product_description" ] = AmazonProductPage .amazon_product_description .texts_as_string ()
102
+ AmazonProductPage .amazon_product_details .scroll_to_locator ()
96
103
ui_dynamic_data ["amazon_product_details" ] = AmazonProductPage .amazon_product_details .texts_as_string ()
97
104
98
105
with allure .step ("Compare the dynamic value from UI with the stored file" ):
0 commit comments