123ArticleOnline Logo
Welcome to 123ArticleOnline.com!

ALL >> Computer-Programming >> View Article

Selenium Locators And Firefox Addons

By Author: Siyaram Ray
Total Articles: 201

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: 46Word Count: 634See All articles From Author

Computer Programming Articles

1. Using Selenium To Achieve Automation Exploratory Testing
Author: Siyaram Ray

2. Difference Between Automation Testing And Manual Testing
Author: Siyaram Ray

3. User Retention With Mobile App On-boarding
Author: Manoj Mirchandani

4. Did Human Testers Get Replace By Test Automation- Selenium
Author: Siyaram Ray

5. Tips And Benefits Of Automation Testing - Selenium
Author: Siyaram Ray

6. Automation Testing - Top Testing Trends
Author: Siyaram Ray

7. Tips For Choosing A Right Android App Development Company
Author: Manoj Mirchandani

8. Extraordinary Highlights And Career Growth In Selenium
Author: Siyaram Ray

9. Selenium Tutorial: Functions And Features Of Selenium
Author: Siyaram Ray

10. What Is C#?
Author: Karan Singh

11. Learn How To Reset Or Change Your True Key Master Password Of Mcafee
Author: James Watson

12. Introduction Of Selenium Test Automation For Web Applications
Author: Siyaram Ray

13. Purposes Of Enthusiasm Of Java Multithreading
Author: Infocampus

14. Online Education
Author: meerab ali

15. Scriptless Test Automation In Selenium - Benefits
Author: Siyaram Ray

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