×

Name Locator in Selenium IDE

NAME LOCATOR:

It is used to find the name in the web element.

If we have multiple web elements of the same name, then the first matched element would be returned.

  • Open the Firefox browser
  • Click on the Selenium icon, and it will open the Selenium IDE interface.
  • Now go to the Test Script Editor Box and click on the command text box.
NAME LOCATOR
  • Write the first command as:-

Command: open

Target: https://login.yahoo.com

Command open
  • This command loads the login page of yahoo on Firefox browser.
  • Then right-click on the username textbox and,
  • Click on inspect Element (Q).
command loads the login page of yahoo on Firefox browser
  • You will get a window contains all the specific codes involved in the Development Tool of the Username text box.
  • Then drag your mouse over the developer tools; you will see the highlighted area of the username textbox on the yahoo page.
  • Then select the name attribute that contains the specific name for the Username text box.
You will get a window contains all the specific codes involved
  • Now write the second command in selenium –IDE interface:-

Command: click

Target: name=username

Command click
  • The username Textbox is clicked.
  • Then we have to enter data in the text box, so for this, we will use the same name element.
  • The third command is:

Command: type

Target: name=username

Value: username

e.g.-xyz11@yahoo.com

username Textbox is clicked.
  • Then right-click on the Next button and,
  • Click on inspect Element (Q).
right-click on the Next button
  • You will get a window contains all the specific codes involved in the Development Tool of the next button.
  • Then drag your mouse over the developer tools; you will see the highlighted area of the username textbox on the yahoo page.
  • Then select the name attribute that contains the specific name for the Next button.
You will get a window contains all the specific codes involved in the Development Tool of the next button
  • Now write forth command in selenium –IDE interface:-

Command: click

Target: name=sign in

  • It will lead you to the next button on the browser.
It will lead you to the next button on the browser
  • Then Right-click on the password textbox then,
  • Click on inspect Element (Q)
  • You will get a window contains all the specific codes involved in the Development Tool of the Password text box.
  • Drag the mouse over the developer tools; you will see the highlighted area of the password textbox on the yahoo page.
  • Then select the name attribute that contains the specific name for the Password text box.
Right-click on the password
  • Now write the fifth command in selenium –IDE interface:-

Command: click

Target: name=password

  • The password text box is clicked.
  • Then we have to enter data in the text box, so for this, we will use the same name element.
  • The sixth command is:

Command: type

Target: name=password

Value: User password

 e.g.-*********

enter data in the text box
  • Then Right-click on the Sign-Up button then,
  • Click on inspect Element (Q).
Right-click on the Sign-Up button
  • You will get a window contains all the specific codes involved in the Development Tool of the Sign-Up text box.
  • You have moved the mouse over the developer tools; you will see the highlighted area of the Sign-Up textbox on the yahoo page.
  • Then select the name attribute that contains the specific name for the Sign-Up text box.
specific name for the Sign-Up text box
  • Then we have to enter data in the text box, so for this, we will use the same name element.
  • The sixth command is:

Command: click

Target: name=verifyPassword

we have to enter data in the text box
  • And click on the Run Current Test button.
  • It will execute all the inserted commands on the browser.
  • The Log pane is displaying the overall summary of the executed test scripts.
  • And you can see the executed command results in the Brower as well.
click on the Run Current Test button

Related Topics

Selenium WebDriver-Locators

Selenium WebDriver-Locators The WebDriver uses the same set of locating strategies like selenium -IDE for specifying the location of the web element. Each locating strategy has its command in Java to locate...

1 minute read.

XPath Axes Selenium WebDriver

XPath Axes XPath axes are those axes that are used to search for the multiple nodes in the XML document from the current node context. These methods are mainly used when the...

14 minutes read.

Selenium vs QTP

In this section, we are comparing the most frequently used automation tool –Selenium and QTP. Selenium and QTP have relative advantages over each other- FeaturesSeleniumHP QTPLicensingSelenium is an open-source testing tool....

3 minutes read.

Selenium WebDriver-XPath Locator

Selenium WebDriver-XPath Locator The locators can make the object identification of all the selenium tools. There are eight locators available in selenium web driver, but most of the time we go for...

14 minutes read.

CSS Selector: Inner text in Selenium IDE

CSS Selector: Inner text The inner text is used to identify and create a CSS Selector using a string pattern of the HTML tag which is displayed on the web page. Syntax...

1 minute read.

Selenium WebDriver - IE [Internet Explorer] browser

Selenium WebDriver - IE [Internet Explorer] browser In this segment, we will understand how to run a test script with the help of the IE (Internet Explorer) browser. It is a standalone...

4 minutes read.

Operational Controls Methods in Selenium WebDriver

Operational Controls Methods The Operational controls are used to perform all the actions on the web elements like click on the button, pass the value in the text box, and click...

4 minutes read.

Mouse and Keyboard Controls in Selenium WebDriver

Mouse and Keyboard Controls in Selenium WebDriver In this tutorial, we will learn about how to handle mouse and keyboard event using action class in selenium WebDriver. Action Class in Selenium WebDriver: Action...

13 minutes read.

Link Text Locator in Selenium IDE

LINK TEXT Link textlocator is used to identify only the weblink element based on the name of the link. Whenever multiple links are there, it will not work; it will work only...

1 minute read.

Selenium WebDriver Tutorial

Seleniun WebDriver Introduction Selenium WebDriver is the essential tool of Selenium Tool Suite because it can directly communicate the browser without any server.  Selenium WebDriver is a browser automation framework that accepts...

3 minutes read.

Selenium WebDriver- Checkbox handling

Selenium WebDriver- Checkbox handling In this tutorial, we will be learning about handling the checkbox in selenium WebDriver. Let us take one example to give you a better understanding of Checkbox handling,...

4 minutes read.

Selenium WebDriver- Microsoft Edge Browser

Selenium WebDriver- Microsoft Edge Browser: In this tutorial, we will learn how to launch the Microsoft Edge browser in the Selenium WebDriver. Before we start automating our test script with Microsoft Edge...

4 minutes read.

Selenium Testing

Selenium is a functional testing tool and compatible with non–functional testing tool. Selenium is free and not required any licensing. There are specified types of testing that can be automated using Selenium:-   Functional Testing: Checking every component...

3 minutes read.

Selenium WebDriver - Navigation Controls Commands

Navigation Controls Commands in Selenium WebDriver WebDriver is used to hold the browser history and perform browser navigation operations like, back, forward, and refresh. Whenever a WebDriver launches a browser, all...

5 minutes read.

Selenium-IDE Login test

Login test for Selenium-IDE Now we are learning, how to create a Login/sign-up Test case in Selenium IDE. For our testing purpose, we are going to test the login page provided by...

2 minutes read.

First test case of Selenium-IDE

First Test Case of Selenium-IDE: In this part, we are discussing how to create a basic test case in Selenium-IDE: The entire test script execution process in Selenium -IDE can be divided...

4 minutes read.

CSS Selector: Sub String in Selenium IDE

CSS Selector: Sub String CSS Selector Sub-string is used to match a partial string to locate a particular web element. There are three ways to match a substring using a CSS Selector. Match...

2 minutes read.

Id Locator in Selenium IDE

Id Locator Id locator is used to find the web element by the help of id of that element because ID is likely to be unique for each web element. Target Format: Id=id of the...

2 minutes read.

Selenium IDE Tutorial for Beginners

Selenium IDE Introduction Selenium IDE stands for Integrated Development Environment. Selenium-IDE is released in 2006 and developed by SHINYA [JAPAN] THOUGHTWORK Company. Selenium IDE implemented as a Firefox plug-in, and concedes the record, edit, and debug tests....

2 minutes read.

Data-Capture Controls Methods in Selenium WebDriver

Data-Capture Controls Methods: The data-capture controls are used to determine the text, size, location, and the CSS value of the web element, etc. Some of the most commonly used data-capture controls are...

7 minutes read.