Home
Selenium
Selenium Python
Software Testing
Appium
JMeter
JUnit
Postman
Jira
TestNG
SoapUI
UIPath
RPA
QA
Interview Q
Selenium Tutorial
Selenium TutorialBasic TerminologySelenium FeaturesSelenium LimitationsSelenium vs
QTPSelenium Tool Suite
Selenium IDE
Selenium IDEIDE-InstallationIDE-FeaturesIDE-First Test CaseIDE-Login TestIDE-
CommandsIDE-Creating Test CasesIDE- Locating Strategies
Selenium WebDriver
Selenium WebDriverWebDriver Vs RCWebDriver-InstallationFirst Test CaseWebDriver
CommandsRunning Test on ChromeRunning Test on FirefoxRunning Test on IERunning Test
on SafariLocating StrategiesHandling Drop-DownsWebDriver-Drag and DropWebDriver-
Handling AlertsScrolling a Web PageWebDriver - Browser CommandsWebDriver - Navigation
CommandsWebDriver - WebElement CommandsHandling Radio ButtonsHandling
CheckboxSelenium AssertionsSelenium Grid
Misc
Selenium WaitsHow to Use AutoIT with Selenium Webdriver
Selenium Python
Selenium Python Tutorial
Selenium C#
Selenium C# Tutorial
Selenium Maven
Selenium Maven
Interview Questions
Selenium Interview
Next →← Prev
Selenium IDE- Locating Strategies (By Name)
o The name locator type will locate the first element with a matching name attribute.
o For example, name=username.
Let us consider an example on how to use name locator as a target for commands in Selenium IDE.
We will create a login test, so that you could get a better understanding of locating elements through n
o Launch Firefox browser.
o Click on the Selenium icon present on the top right corner on your browser.
o It will launch the default interface of Selenium IDE.
o Click on the command text box present on the Test Script Editor Box.
o Modify the properties of first command as:
o Command: open
o Target: https://mail.rediff.com/cgi-bin/login.cgi
o After execution, this command will load the Rediff login page on your Firefox browser.
For second command to be entered, we need a unique identification element for the Username text b
the IDE to identify the target location.
o Right click on the "Username" text box and select Inspect Element.
o
o It will launch a window containing all the specific codes involved in the development o
text box.
o Pick element with the matching name attribute that contains the specific name for the "Usernam
o Modify the properties of second command as:
o Command: click at
o Target: name=login
o After execution, this command will click on the Username text box.
We will use the same element for our next command.
o Modify the properties of third command as:
o Command: type
o Target: name=login
o Value: username
o After execution, this command will type the username in the Username text box
We will now add a command that will click on the "Password" text box. For this command, w
identification for the "Password" field which will help the IDE to identify the target location.
o
o Right click on the "Password" text box and select Inspect Element.
o It will launch a window containing all the specific codes involved in the development
text box.
o
o Pick element with the matching name attribute that contains the specific name for th
box.
o Modify the properties of fourth command as:
o Command : click at
o Target : name=passwd
o Upon execution this command will click on the Password text box.
We will use the same ID element for our next command which involves typing the password as login cr
o Modify the properties of fifth command as:
o Command : type
o Target : name=passwd
o Value : **********(User Login Password)
o Upon execution this command will type the user password as the login credential.
At last, we need a unique identification element for the Login Submit button which will help the ID
target location.
o Right click on the "Go" button and select Inspect Element.
o
o It will launch a window containing all the specific codes involved in the development o
button.
o
o Pick element with the matching name attribute that contains the specific name for the "G
o Modify the properties of sixth command as:
o Command : click at
o Target : name=proceed
o After execution, this command will click on the "Go" submit button.
o Click on the "Run Current Test" button present on the tool bar menu of the IDE. It will execute a
commands on the browser and gives you an overall summary of the executed test script.
o The Log pane displays the overall summary of the executed test scripts.
Thus, you can see that we have used name locator as a target for most of our Selenium commands.
Next Topic Locating by XPath
← PrevNext →
For Videos Join Our Youtube Channel: Join Now
Feedback
o Send your Feedback to feedback@javatpoint.com
Help Others, Please Share
Learn Latest Tutorials
Splunk
SPSS
Swagger
Transact-SQL
Tumblr
ReactJS
Regex
Reinforcement Learning
R Programming
RxJS
React Native
Python Design Patterns
Python Pillow
Python Turtle
Keras
Preparation
Aptitude
Reasoning
Verbal Ability
Interview Questions
Company Questions
Trending Technologies
Artificial Intelligence
AWS
Selenium
Cloud Computing
Hadoop
ReactJS
Data Science
Angular 7
Blockchain
Git
Machine Learning
DevOps
B.Tech / MCA
DBMS
Data Structures
DAA
Operating System
Computer Network
Compiler Design
Computer Organization
Discrete Mathematics
Ethical Hacking
Computer Graphics
Software Engineering
Web Technology
Cyber Security
Automata
C Programming
C++
Java
.Net
Python
Programs
Control System
Data Mining
Data Warehouse
Like/Subscribe us for latest updates or newsletter
LEARN TUTORIALS
Learn JavaLearn Data StructuresLearn C ProgrammingLearn C++ TutorialLearn C#
TutorialLearn PHP TutorialLearn HTML TutorialLearn JavaScript TutorialLearn
jQuery TutorialLearn Spring Tutorial
INTERVIEW QUESTIONS
Java Interview QuestionsSQL Interview QuestionsPython Interview
QuestionsJavaScript Interview QuestionsAngular Interview QuestionsSelenium
Interview QuestionsSpring Boot Interview QuestionsHR Interview QuestionsC++
Interview QuestionsData Structure Interview Questions
ABOUT
Javatpoint is developed to help students on various technologies such as Artificial
Intelligence, Machine Learning, C, C++, Python, Java, PHP, HTML, CSS, JavaScript,
jQuery, ReactJS, Node.js, AngularJS, Bootstrap, XML, SQL, PL/SQL, MySQL etc.
Javatpoint provides tutorials with examples, code snippets, and practical insights,
making it suitable for both beginners and experienced developers.
There are also many interview questions which will help students to get placed in the
companies.
CONTACT
Address: G-13, 2nd Floor, Sec-3
Noida, UP, 201301, India
Contact No: 0120-4256464, 9990449935
Contact UsSubscribe UsPrivacy PolicySitemap
About Me
© Copyright 2011-2021 www.javatpoint.com. All rights reserved. Developed by
JavaTpoint.