123ArticleOnline Logo
Welcome to 123ArticleOnline.com!
ALL >> Computer-Programming >> View Article

Selenium Locators And Firefox Addons

By Author: Siyaram Ray
Total Articles: 272

Selenium gives distinctive kind of locators to exceptionally distinguish web components on the program (HTML content).To see the HTML substance and keep an eye on a webelement:
For Mozilla:
Introduce firebug and firepath addon (mozilla program)
For Chrome:
Right tap on the webelement and afterward tap on "Investigate component" to get the coveted html content for that component.
For IE:
Utilize work key 'F12' to get the html content.Let's discussion about the firebug in mozilla program for the present to find out about locators, Essential: mozilla addons are introduced.
Diverse sort of locators in selenium:
by id:
See underneath screenshot for the means to get the id of a webelement, for this situation we need to get the id of email field on facebook.com
by name:
Search for the html content with catchphrase - > name =
Exceptional case for by name: If different components have a similar incentive for a name property, in the beneath screenshot, 2 radiobuttons have same name as tripType.At that point utilize channels to additionally refine area technique. The default channel sort is esteem (coordinating the esteem characteristic), so for our situation:
name = tripType esteem = oneway
name = tripType esteem = twoway
thusly, we recognize both the radiobuttons
by linktext:
This is a basic technique for finding a hyperlink in your website page by utilizing the content of the connection (i.e the name given to the 'a' tag in the html content). In the event that two connections with a similar content are available, at that point the first match will be utilized.
by CSS Selector:
CSS (Cascading Style Sheets) is a dialect for portraying the rendering of HTML also, XML records. CSS utilizes Selectors for restricting style properties to components in the record. we should perceive how we can get the css selectors from the html content:
css=tag:contains("inner content")
Note: internal content is the correct word that is shown on program for that component.
by xpath:
XPath is the dialect utilized for finding hubs in a XML archive and HTML can be a usage of XML (XHTML). Selenium opens up a wide range of new potential outcomes, for example, finding the third checkbox on the page. XPath locators can likewise be used to determine components by means of properties other than id and name.
Firefox addons to recognize web components for Selenium:-
To see the HTML substance and keep an eye on a web element, there are distinctive routes for various programs, for the most part individuals utilize firefox program to distinguish the web components as it has more number of addons for web component recognizable proof.
1) Firebug –
When firebug is introduced, you will see a bug symbol on the correct best corner of the program, click according to the underneath screen request to distinguish the webelements.
2) firepath –
will get this with the firebug addon: which shows the relative or outright xpath of a web component
3) xpath checker –
Another addon to mozilla to distinguish the xpath as demonstrated as follows, Without flaw tap on any program component and tap on the xpath… alternative.
4) WebDriver Element Locator –
Right tap on any web component and tap on the java locatiors… choice to get the xpath. For Chrome program addon, allude Chrome addon for selenium.
About Author:
Become a selenium testing engineer in 2 months by joining Infocampus. Infocampus is an institute that provides selenium training in Bangalore. Along with training, infocampus also helps candidates to get the job in testing field by providing 100% assistance on placement. Free demo classes, mock interviews, live projects, real time examples with practical oriented classes are available only at Infocampus. It is one of the best selenium training institutes in Bangalore. Contact 9738001024 or visit http://infocampus.co.in/best-selenium-testing-training-center-in-bangalore.html for details on selenium training.

Total Views: 62Word Count: 634See All articles From Author

Computer Programming Articles

1. Java Vs Python: Which Programming Language To Master?
Author: Individual

2. 9 Myths Regarding Seo That You Simply Ought To Stop Basic Cognitive Process Nowadays
Author: emly

3. Selenium Testing – Common And Difficult Interview Questions
Author: Siyaram Ray

4. Concrete Scanning
Author: concrete scanning

5. Future Of Java Technology
Author: Individual

6. El Mejor Método Absoluto Para Lograr La Conversión De Ost A Pst
Author: EdbMails

7. Native Vs. Hybrid App Development: Which Approach To Choose In 2018?
Author: Alex Porubay

8. What To Do When Norton’s Firewall Block A Genuine Website?
Author: Daisy Matilda

9. Need Of Fundamental Web Development Knowledge
Author: Siyaram Ray

10. Data Analytics And Data Visualization - Job Opportunities
Author: pankaj singh

11. Creating Website – Essential Requirement For Web Development
Author: Siyaram Ray

12. Choosing The Right Technology For Your Mobile App
Author: Jules Arkley

13. Readymade Alibaba Clone Script For Next Generation
Author: Riya Dubay

14. Web Development – Top Programming Languages Needs To Learn
Author: Siyaram Ray

15. Why Redundancy, Scalability And High Availability Are Essential For Your Contact Center?
Author: Teckinfo

Login To Account
Login Email:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: