Selenium Modified Task List
Selenium Modified Task List
Traversing in Selenium
1. Task: Locate Elements Using ID
Question:
Open a website of your choice (e.g., Flipkart or Amazon or Dot portal in wipro laptop).
Identify and interact with the following elements using their ID attributes:
- Search box
- Login button
Expected Output:
The search box should be identified using the ID locator and text should be entered. The
Login button should be identified using the ID locator and clicked.
- Search box
- Submit button (if available)
Expected Output:
The element should be identified using the Name locator, and you should be able to interact
with it (e.g., entering text or clicking).
On the webpage, identify any links using Link Text. Perform the following tasks:
- Find a link with the exact visible text (e.g., "Login", "Sign Up").
- Click on the link.
Expected Output:
The link should be clicked after identification by its full link text.
4. Task: Locate Elements Using Partial Link Text
Question:
Identify links on the webpage using Partial Link Text. Perform the following:
Expected Output:
Identify elements using both absolute and relative XPath. Tasks include:
Expected Output:
The elements should be identified and interacted with using XPath expressions.
1. 1. Following-sibling: Identify an element (like a button) and find its following sibling
(e.g., a checkbox or another button).
2. Preceding-sibling: Identify an element and find its preceding sibling (e.g., text before a
button).
3. Descendant: Find an element and locate its descendants (e.g., all links or buttons
within a specific section).
Expected Output:
You should be able to traverse through sibling and descendant elements and perform
actions on them.
7. Task: Interact with Input Fields and Buttons Using Different Locators
Question:
Using any locator (ID, Name, Link Text, Partial Link Text, or XPath), perform the following
tasks on a web page:
Expected Output:
Elements should be identified using different locator strategies, and you should be able to
perform the appropriate interactions.