Selenium Tutorial series | Sinhala | PART 3 - Finding the web elements and interacting with them

Опубликовано: 09 Август 2026
на канале: Learn Automation In Sinhala
6,089
153

When interacting with web pages we might search a term, click a link, download a file, upload a file and so on. For all these operations, we have to find the respective element and click or perform other operations on that particular element. In our code also, we are going to do the same. Let’s find out how to find the elements in this video. Here, we are going to find the search box of Google and send some search term into it with the help of selenium and Java.
⭐ Element Selection Strategies or Locators ⭐
There are eight different built-in element location strategies or locators available in WebDriver:
1. id -- Locates elements whose ID attribute matches the search value
2. name -- Locates elements whose NAME attribute matches the search value
3. class name -- Locates elements whose class name contains the search value
4. tag name -- Locates elements whose tag name matches the search value
5. CSS selector -- Locates elements matching a CSS selector
6. XPath -- Locates elements matching an XPath expression
7. link text -- Locates anchor elements whose visible text matches the search value
8. partial link text -- Locates anchor elements whose visible text contains the search value. If multiple elements are matching, only the first one will be selected.

Support by donating:
---------------------------------
Best way to reach me (replies will be faster): YouTube comment section
👤 Name : Hashir Hasmy
📱 LinkedIn :   / mohamed-hashir-370840198  
📧 Email : [email protected]
🔗 GitHub : https://github.com/hashirhasmy

#selenium #locators #selectorTypes #HashirHasmy #webAutomation