123ArticleOnline Logo
Welcome to 123ArticleOnline.com!

ALL >> Computer-Programming >> View Article

Selenium Locators And Firefox Addons

By Author: Siyaram Ray
Total Articles: 131

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#id
css=tag.class
css=tag[attribute=value]
css=tag.class[attribute=value]
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: 12Word Count: 634See All articles From Author

Computer Programming Articles

1. Using Selenium For Short And Long Of Waits In Web Applications
Author: Siyaram Ray

2. Cross Currency Payment In Oracle Fusion Financials Payment Work Bench :
Author: Vishal

3. Python Oops Concepts
Author: Infocampus

4. Wearable Computing Devices App Development
Author: mtoge

5. Font Family In Css
Author: Tipsfor123456 Tipsfor

6. List Property In Css
Author: Tipsfor123456 Tipsfor

7. Border Property In Css
Author: Tipsfor123456 Tipsfor

8. Text Propeety In Css
Author: Tipsfor123456 Tipsfor

9. Introduction And Features Of Selenium Webdriver
Author: Siyaram Ray

10. Box Modal Property
Author: Tipsfor123456 Tipsfor

11. Background Property In Css
Author: Tipsfor123456 Tipsfor

12. Link Property In Css
Author: Tipsfor123456 Tipsfor

13. Float Property In Css
Author: Tipsfor123456 Tipsfor

14. Inline And Block Property In Css
Author: Tipsfor123456 Tipsfor

15. Padding Property In Css
Author: Tipsfor123456 Tipsfor

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