Selenium An Effective Weapon in The Open Source Armory
Selenium An Effective Weapon in The Open Source Armory
www.TestingGeek.com
Agenda
Introduction to Selenium Selenium IDE Lets play Limitations of Selenium IDE Selenium RC Play Again Ruby with Selenium RC Discussion / Questions
www.TestingGeek.com
What is Selenium?
www.TestingGeek.com
Selenium is
Test automation tool for web applications. Developed in Java Script. Can be used for most of the browser / platform combinations. Support many languages, including Ruby, Python, Java and so on. Free & Open Source !!!
Atlantis Software | www.atlantissw.com www.TestingGeek.com
Lets Play
www.TestingGeek.com
Selenium IDE
Firefox plug-in Integrated Development Environment for Selenium Tests. Provides record and playback functionality. Provides the ability to debug test scripts. Auto complete common selenium commands. Export tests in different formats like HTML, Ruby, Python and so on. Supports user extensions.
Atlantis Software | www.atlantissw.com www.TestingGeek.com
www.TestingGeek.com
IDE Explained
www.TestingGeek.com
Exercise
Ensure that http://www.TestingGeek.com is the first link for Google search on Testing Geek Open http://www.google.co.uk in Firefox Open Selenium IDE, Tools Selenium IDE Ensure that Selenium IDE is in recording mode. Type Testing Geek in the Google search bar and click Search On the search results verify that Software Testing - Geek is present at the first place. Save the test case as google_ide Run the saved test case back again using the IDE. View the results back in the IDE
Atlantis Software | www.atlantissw.com www.TestingGeek.com
www.TestingGeek.com
Test Runner
www.TestingGeek.com
Limitations
Browser
Selenium IDE is only available for the Firefox. It can not be used for different browsers.
Language
Selenium IDE can execute scripts created in Selenese only.
Complexity
It is difficult to use Selenium IDE for checking complex test cases involving dynamic contents.
www.TestingGeek.com
What Next??
www.TestingGeek.com
How it works
www.TestingGeek.com
www.TestingGeek.com
www.TestingGeek.com
What is Ruby???
It is object oriented scripting language Download from http://www.ruby-lang.org According to official Ruby Website, Ruby is the successful combination of: Smalltalk's conceptual elegance, Python's ease of use and learning, and Perl's pragmatism.
Atlantis Software | www.atlantissw.com www.TestingGeek.com
Lets Start
Record a sample script in Selenium IDE, same as first exercise. Export this test case as ruby. Analyze the test script.
Atlantis Software | www.atlantissw.com www.TestingGeek.com
Client Driver and ruby unit testing framework Setup is executed before every test case, gives selenium object and launches browser.
Browser
Tear down is executed after every test case and kills selenium and browser.
www.TestingGeek.com
Run it !!!
www.TestingGeek.com
Selenium RC Benefits
Can be used for any Java Script enabled browser. Have access to the complete features / libraries of the high level language. Can be used to automate complex test cases. Makes it possible to create fast, robust and scalable automation.
Atlantis Software | www.atlantissw.com www.TestingGeek.com
Interesting Stuff
Element Locators
Based on XPath, use XPather from
http://xpath.alephzarro.com/download
Based on DOM
Element Filters
Based on Index Based on Value
Visit www.openqa.org for official documentation, troubleshooting and information on support. Selenium articles on http://www.TestingGeek.com
Thank You!!!
Atlantis Software | www.atlantissw.com www.TestingGeek.com
QUESTIONS??
www.TestingGeek.com