Week 5 Practicing DOM and Element Interaction
Week 5 Practicing DOM and Element Interaction
ELEMENT INTERACTION
WORKING WITH ELEMENT
METHODS
• 4. Following: Selects everything in the document after the closing tag of the
current node.
• 6. Parent: Selects the parent of the current node. (Use Highlight Method from Week 4
for this)
• 7. Preceding: Selects all nodes that appear before the current node in the
document, excluding ancestors and attributes.
• 9. Self: Selects the current node itself. (Use Highlight Method from Week 4 for this)
• 10. Attribute: Selects the attributes of the current node. (Use Highlight Method from
Week 4 for this)
• An intelliJ project named “W5 Xpath Axes.zip” has been uploaded under the
course material section.
• Download, unzip, and then open it in the IntelliJ for practice as shown and
done during the class.
INTERACTING WITH WEB
ELEMENTS
• Objective: Learn how to interact with various basic web elements using
Selenium with Java.
• Key Web Elements:
• Dropdowns: Selecting options from a dropdown menu.
• Checkboxes: Interacting with checkboxes and verifying selection.
• Radio Buttons: Selecting radio buttons and checking their status.
• Tables: Extracting data from tables.
• Images: Checking image display and attributes.
• Capturing Screenshots: Taking screenshots of elements or pages.
• Date Pickers: Selecting dates from date pickers.
• File Upload/Download: Interacting with file upload and download elements.
INTELLIJ PROJECT HELP
• An intelliJ project named “W5 Web Elements Practice.zip” has been uploaded
under the course material section.
• Download, unzip, and then open it in the IntelliJ for practice as shown and
done during the class.
• Notes:
• Practice: Uncomment different sections of the code to practice handling each type
of element.
• Explore: Use the demo websites provided in the code examples to explore more
web elements and their interactions.