123ArticleOnline Logo
Welcome to 123ArticleOnline.com!

ALL >> Computer-Programming >> View Article

Selenium – Features, Xpath Patterns And User Extensions

By Author: Siyaram Ray
Total Articles: 201

What is Selenium Test?
Selenium is an open source web test computerization device utilized for mechanizing electronic application tests. It has a few parts:
• Selenium IDE(a Firefox module utilized for recording and playing back test application)
• Selenium RC (Selenium Server to dispatch and communicate with web programs)
• Selenium Client Driver (Selenium API, which can be utilized with numerous dialects)
• Selenium Grid (Selenium Hub to dispatch various tests in the meantime)
• Selenium WebDriverBackedSelenium (used to run Selenium RC applications with Selenium Web Driver
Selenium Features:
• Works anyplace Javascript is upheld
• Hooks with numerous different dialects: Java, .Net, Ruby, Python
• Can mimic a client route through pages and web components
• Verifies and attests data on the website page
• Actual content is HTML based, so natural to learn and utilize it immediately
• Can make a test suite that incorporates different experiments
• Can run the test suite with Selenium IDE or Selenium summon line
• Selenium API can bolster different programs, so application program similarity can be tried effectively.
• Selenium IDE contains rich charges to utilize when recording and playing back test applications.
• Selenium cell phone programming interface can test portable application.
What amount does Selenium permit cost per customer machine?
Selenium is open source programming, discharged under the Apache 2.0 permit and can be downloaded and utilized without charge.
Selenium IDE Useful Xpath Patterns:-
When utilizing Xpath in Selenium IDE or Selenium WebDriver to distinguish web components, here are some helpful examples to find dynamic esteems for component's id qualities.
• text
/div[text()='selenium master']
• starts-with
where 12345 is a dynamic number you could utilize the accompanying XPath:
/input[starts-with(@id, 'username-')]
• contains

For the above xpath, utilizing Css is speedier and neater. css=span.login.module
Utilizing Xpath Checker in Selenium Test Automation:-
When utilizing Xpath, affirming the Xpath content is essential to ensure that Selenium IDE, WebDriver or Selenium RC can distinguish the xpath locator amid the test.
QA Engineers can utilize Xpath Checker to confim xpath. Xpath Checker should be introduced on Firefox in light of the fact that it is an extra.
For instance, on Wikipedia page, there is a connection named "English". When utilizing xpath, we can utilize the content beneath.
While affirming the xpath with Xpath Checker, Xpath Checker shows the connection.
Selenium IDE Xpath Tutorials:-
QA Engineers need to give any component locator(like id, name, css way, xpath and so forth.) in target section of selenium window to find that particular component to play out some activity on it .If you have worked with selenium IDE then you realizes that occasionally components does not contains id or name. Finding component by xpath is the method for finding component and you can utilize it as an option of id or name of component.
Path in XML report demonstrates the heading of component area through hubs and traits.
There are three fields 1. Info content box 2. select drop down and 3. input catch. What's more, roar of those fields there is development of relative XML hubs through firebug. As you find in picture, you can utilize "id=searchInput" or "name=search" to recognize input content box to type something in to it.
Selenium IDE User Extensions:-
Client augmentations are JavaScript records that enable one to make his or her own customizations and highlights to include extra usefulness. Frequently this is as redone charges despite the fact that this extensibility isn't restricted to extra orders.
To include client augmentations, open the "Alternatives" menu and select choices. On the Selenium IDE Options window, include Selenium IDE expansions.
Utilizing Globbing Pattern and Regular Expression with Selenium IDE:-
In some experiments, QA Engineers need to confirm content or number examples by utilizing verifyTextPresent, verifyTitle, verifyAlert, assertConfirmation, verifyText, and verifyPrompt. Selenium locators can use example to depict exceptional characters, and dynamic writings to check what content is relied upon as opposed to specifying that content precisely.
There are three kinds of examples: globbing, normal articulations, and correct.
• which means "coordinate anything," i.e., nothing, a solitary character, or many characters.
• [ ] which means "coordinate any single character found inside the square sections.
• [aeiou] coordinates any lowercase vowel
• [0-9] coordinates any digit
• [a-zA-Z0-9] coordinates any alphanumeric character
When utilizing globbing design, for a Selenese charge, you can prefix the example with a glob: name
Standard Expression Patterns:
Standard articulation designs are the most intense of the three sorts of examples that Selenium underpins. General articulations are likewise upheld by most abnormal state programming dialects, numerous word processors, and a large group of instruments, In Selenium, normal articulation designs enable a client to perform many undertakings that would be extremely troublesome something else. For instance, assume your test expected to guarantee that a specific table cell contained only a number. regexp: [0-9]+ is a straightforward example that will coordinate a decimal number of any length.
Correct Pattern:
Correct example implies that clients need to confirm the correct messages or numbers. It utilizes no extraordinary characters by any means.
About Author:
Infocampus is an institute that provides selenium training in Bangalore. Infocampus conducts practical oriented classes with real time projects with live examples. Selenium classes will be taken by an expert professional having 10+yrs of work experience. Attend free demo classes before joining selenium course. Infocampus is a best selenium training institute in Bangalore. Call 9738001024 and get more details or visit http://infocampus.co.in/best-selenium-testing-training-center-in-bangalore.html.

Total Views: 20Word Count: 879See 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: