This project automates the login process and basic product-related actions on the OpenCart demo site using the Robot Framework and SeleniumLibrary.
- Automates login to the OpenCart demo portal.
- Searches and adds specified products to the cart.
- Utilizes the SeleniumLibrary for web automation.
- Includes a structured approach with test case definitions, variables, and suite setup/teardown.
Before running the tests, ensure you have the following installed:
- Python: Version 3.6 or later.
- Robot Framework: Install using
pip install robotframework. - SeleniumLibrary: Install using
pip install robotframework-seleniumlibrary. - WebDriver: Install the appropriate driver for your browser (e.g., ChromeDriver for Google Chrome).
test.robot: Contains the test cases and setup for automation.- Libraries: SeleniumLibrary is used for browser automation.
- Variables:
${products}: A list of products for testing.${MAX_LIMIT}: A variable demonstrating simple arithmetic in Robot Framework.
- GIVEN: Open the browser and log in to the OpenCart portal.
- WHEN: Perform product search and add specified products to the cart.
- THEN: Verify the product-related actions were successful.
-
Open a terminal in the directory containing
test.robot. -
Execute the following command:
robot tests/test.robot
This project automates the process of searching for wristwatches on Amazon, selecting a specific product, and interacting with various elements on the page using the Robot Framework and SeleniumLibrary.
- Searches for wristwatches on Amazon.
- Interacts with elements like search bar, product list, and filters.
- Captures details about a specific product for further processing.
- Navigate to the Amazon India website.
- Search for the product defined by
${PRODUCT}. - Interact with elements such as:
- Search bar (
id:twotabsearchtextbox) - Submit button (
id:nav-search-submit-button) - Product filters and results.
- Search bar (
- Select the 5th product from the search results
robot tests/assignment.robot