- Create a Selenium (https://selenium-python.readthedocs.io/) script as a part of
test_shoppingtest case. Replacepassstatement (Line 2) with the script - It's only allowed to define UI elements using:
- Xpath selectors (https://www.guru99.com/xpath-selenium.html)
- CSS selectors (https://saucelabs.com/resources/articles/selenium-tips-css-selectors)
- BeautifulSoup library (https://beautiful-soup-4.readthedocs.io/en/latest/)
- The script should be based on the following scenario:
- user visits
amazon.comwebsite - user fills out a search field with the product name and activates search ==>
==> a page with search results is displayed. - user looks for the product of specified color having maximum reviews count
- user extracts minimum product price (with applied discount) from the page
- user assigns
amazon_price= product price - user visits
bestbuy.comwebsite - user chooses
United Statescountry - user fills out a search field with the product name and activates search ==>
==> a page with search results is displayed. - user looks for the product of specified color having maximum reviews count
- user extracts minimum product price (with applied discount) from the page
- user assigns
bestbuy_price= product price
- Uncomment the last assert from the test script (Line 4).
- Run the test case with Selenium in headless mode. From project root it would be:
pytest tests/test_shopping.py
There's a 50/50 possibility it fails. That's OK. - Provide the results as a new Git repository.