Selenium WebDriver Tutorial #12 - What are Locators in Selenium WebDriver

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ต.ค. 2024
  • Get all my courses for USD 5.99/Month - bit.ly/all-cou...
    ❖ FREE Training's at training.rcvac... ❖
    In this Selenium Webdriver Tutorial we will learn about what are Locators in Selenium WebDriver.
    There are 8 primary locator strategies to identify webelements on any webpage. Along with these 8 strategies Selenium 4 brings Relative Locators strategy as well.
    Help me in spreading the knowledge, please hit LIKE, SHARE and SUBSCRIBE for latest tutorials.
    More tutorial playlists below:
    ❖JIRA BEGINNER TUTORIAL❖ bit.ly/jira-beg...
    ❖JIRA WORKFLOW TUTORIAL❖ bit.ly/2EzKOEB
    ❖JIRA ADMINISTRATION TUTORIAL❖ bit.ly/36MPPFR
    ❖JIRA TUTORIAL INTERMEDIATE❖ bit.ly/Atlassia... TUTORIALS❖ bit.ly/jira-tut...
    ❖ZEPHYR TUTORIAL❖ bit.ly/zephyr-f...
    ❖ SOAPUI TUTORIAL❖ bit.ly/Sopui-tu...
    ❖ JSONPath TUTORIAL❖ bit.ly/2sIZIFG
    ❖ POSTMAN TUTORIAL❖ bit.ly/2PBbhI7
    ❖ ISTQB AGILE TESTER CERTIFICATION TUTORIAL❖ bit.ly/istqb-ag...
    ❖ ISTQB FOUNDATION LEVEL CERTIFICATION TUTORIAL ❖bit.ly/istqb-fo...
    ❖CUCUMBER SELENIUM TUTORIAL❖ bit.ly/cucumber...
    ❖TESTRAIL TUTORIAL❖ bit.ly/testrail...
    ❖AGILE TUTORIALS❖ bit.ly/agile-tu...
    ❖PYTHON TUTORIALS❖ bit.ly/python-p...
    ❖PYTHON BEHAVE TUTORIALS❖ bit.ly/python-b...
    ❖PRACTITEST TUTORIAL❖ bit.ly/practite...
    ❖JAVA TUTORIAL❖ bit.ly/2F1iL1B
    ❖ZEPHYR TUTORIAL❖ bit.ly/zephyr-f...
    ❖ TRAININGS ON RCV ACADEMY PORTAL ❖
    bit.ly/learn-pr...
    bit.ly/learn-ji...
    bit.ly/jira-beg...
    bit.ly/learn-co...
    bit.ly/ISTQB-fo...
    ❖ FOLLOW US ON TWITTER ❖
    / rcvacademy
    / swtmentor
    / mrmverma
    ❖ LIKE US ON FACEBOOK ❖
    / softwaretestingmentor
    / rcvacademy47
    ❖ OUR TUTORIAL WEBSITES ❖
    www.softwarete...
    www.rcvacademy...
    ❖ GET MY TRAININGS ON UDEMY ❖
    www.udemy.com/...
    #SeleniumTutorial #SeleniumTraining #TestAutomation #SeleniumWebDriverTutorial #SeleniumWebDriver #SoftwareTesting #RcvAcademy #SoftwareTestingMentor

ความคิดเห็น • 23

  • @bolexi7902
    @bolexi7902 2 ปีที่แล้ว +1

    These selenium tutorials are second to none, well explained. Everything right on point. Thanks a lot.

  • @shubhamsharma8378
    @shubhamsharma8378 2 ปีที่แล้ว

    Hey Teach, I was searching for Selenium Tutorial and After searching on TH-cam I found your Tutorial. And I loved this Tutorial. Thankyou So Much.

  • @manoj_mafiosi
    @manoj_mafiosi ปีที่แล้ว +3

    Selenium WebDriver Tutorial #12 - Locators in Selenium - Notes
    1. Introduction:
    - Locators play a vital role in identifying elements on a web page in Selenium WebDriver.
    - They are essential for writing effective test cases in Selenium automation.
    2. Web Elements:
    - Web elements are elements present on a web page, such as text fields, buttons, and links.
    - Manual testing involves identifying and interacting with these elements.
    3. Basic Locator Strategies:
    - Selenium provides eight basic locator strategies to identify web elements:
    - ID: Locate elements by their unique ID attribute using "By.id."
    - Name: Locate elements by their name attribute using "By.name."
    - Class Name: Locate elements by their class attribute using "By.className."
    - CSS Selector: Locate elements using CSS selectors with "By.cssSelector."
    - XPath: Advanced locator using XPath expressions with "By.xpath."
    - Link Text: Locate anchor elements (links) based on their visible text with "By.linkText."
    - Partial Link Text: Locate anchor elements using partial matching of their visible text with "By.partialLinkText."
    - Tag Name: Locate elements by their HTML tag name using "By.tagName."
    4. Using Locators:
    - To use locators, we can use the "findElement" method provided by WebDriver.
    - Example: To locate an element by ID, use "driver.findElement(By.id("elementID"))."
    5. Ensuring Unique Locators:
    - Chosen locators must be unique and reliably identify the correct element on the page.
    - If one locator doesn't work, try other locators until finding the most suitable one.
    6. Selenium 4 Update:
    - Selenium 4 introduces relative locators (previously called friendly locators), which will be covered in the next tutorial.
    7. Advanced Locator Strategies:
    - For handling dynamic web elements and more advanced strategies, refer to separate tutorials on XPath and CSS selector.
    8. Conclusion:
    - Locators are crucial for identifying web elements in Selenium WebDriver.
    - Understanding and using various locator strategies enhances test case effectiveness.
    - Selenium 4 introduces relative locators for further improvements.
    - Refer to additional tutorials for handling dynamic elements using XPath and CSS selector.

  • @rishabhsingh6168
    @rishabhsingh6168 3 ปีที่แล้ว +2

    Thanks bro for making such wonder ful series had a great experience so far.

  • @PoonamShinde-zn5fn
    @PoonamShinde-zn5fn ปีที่แล้ว +1

    Great Explanation with the latest Selenium version. Thanks

  • @darshanavekariya5548
    @darshanavekariya5548 ปีที่แล้ว +2

    What an amazing tutorial for beginners, Thank you sir.

    • @softwaretestingmentor
      @softwaretestingmentor  ปีที่แล้ว

      You're very welcome!
      Keep watching for more videos and tutorials.

  • @salonisharma7632
    @salonisharma7632 3 ปีที่แล้ว +1

    Thank you so much sir. These tutorials are really very helpful and well structured.

    • @softwaretestingmentor
      @softwaretestingmentor  3 ปีที่แล้ว +1

      Glad you like them!

    • @priyaroy6005
      @priyaroy6005 2 ปีที่แล้ว

      @@softwaretestingmentor hlo sir
      The method click() is undefined for the type By.
      Why this error is showing. Please help me sir .
      I am not able to figure out the error.

  • @srinivaspatel2567
    @srinivaspatel2567 3 ปีที่แล้ว +1

    thank you so much sir and u r really great sir

  • @samBobo208
    @samBobo208 7 หลายเดือนก่อน

    Hi I am following your tutorial and so far it's been amazing! I just need some help. My code is running and the browser does close after execution but on my console I don't see any information example 'Chrome started successfully' etc. I tried a print statement and it works fine. Any Idea what's wrong?

  • @ganapathisubramanyamjayam
    @ganapathisubramanyamjayam 2 ปีที่แล้ว +2

    great tutorial! but I actually have a small problem. I am trying to use selenium to test a jsp page and I am not able to find any elements there. I have tried finding by name, id and xpath but nothing worked. can I get some help with this please.

  • @moonsharmin8774
    @moonsharmin8774 2 ปีที่แล้ว

    hello sir , i am a beginner here. can explain me why you use hyphen between username ?

  • @shubhangisuryavanshi5860
    @shubhangisuryavanshi5860 3 ปีที่แล้ว

    Sir its not going to Quick tour page when I have typed the command.

  • @gunaseelanponnuvel3180
    @gunaseelanponnuvel3180 2 ปีที่แล้ว

    Sir please tell the priority of Locators in Selenium

  • @priyaroy6005
    @priyaroy6005 2 ปีที่แล้ว

    The method Click() is undefined for the type By .
    Why this error is showing . Please help.

    • @dsc_dsc
      @dsc_dsc 2 ปีที่แล้ว +1

      I hope it's not too late, but you're doing the same mistake as 16:37. Click is a method of findElement, not By. Watch that he add an ) and it solved it.

  • @vanitageorge8634
    @vanitageorge8634 7 หลายเดือนก่อน

    How to get in touch with you?

  • @soundaryaleharichunduri8565
    @soundaryaleharichunduri8565 2 ปีที่แล้ว

    sir ihave done samebut driver.get norworking getting main threadexceptionerror

  • @Bell4Fun
    @Bell4Fun 2 ปีที่แล้ว

    why dataset attribute us not used