P. 1
Selenium

Selenium

|Views: 62|Likes:
Published by Mangesh Nimje

More info:

Published by: Mangesh Nimje on Sep 18, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

12/19/2012

pdf

text

original

Selenium An Effective Weapon In The Open Source Armory

Komal Joshi Director: Atlantis Software Limited Anand Ramdeo Head of Quality Assurance: GCAP Media

Atlantis Software | www.atlantissw.com

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

Atlantis Software | www.atlantissw.com

www.TestingGeek.com

What is Selenium?

Atlantis Software | www.atlantissw.com

www.TestingGeek.com

Selenium is… • Test automation tool for web applications.atlantissw. • Support many languages. Java and so on. • Free & Open Source !!! Atlantis Software | www.com www.com .TestingGeek. • Can be used for most of the browser / platform combinations. including Ruby. Python. • Developed in Java Script.

Effect of Open Source on Selenium • • • • Selenium IDE Selenium Core Selenium Remote Control Selenium Grid User / developer community solving problems for most of us and making us more productive.TestingGeek.com .com www. Atlantis Software | www.atlantissw.

com .TestingGeek.atlantissw.com www.Why Learn Selenium? To make this world a better place!!! How?? Well tested web applications will result in less frustration for the end-users and will make them happy!!! Atlantis Software | www.

com www. • Most of the Rich Web and AJAXified Applications involve Java Script.com .. Atlantis Software | www. • Selenium is the best tool for testing Java Script and Java Script interactions. • Desktop applications are slowly becoming history.Learn Selenium Because.TestingGeek.atlantissw. • Web is becoming important.

TestingGeek.Let’s Play Atlantis Software | www.com www.com .atlantissw.

TestingGeek. Python and so on. • Provides the ability to debug test scripts. • Provides record and playback functionality. • Export tests in different formats like HTML.atlantissw.Selenium IDE • Firefox plug-in • Integrated Development Environment for Selenium Tests. Atlantis Software | www. • Supports user extensions. • Auto complete common selenium commands.com . Ruby.com www.

Install & Start • Download from http://www.openqa. org • Access Tools – Selenium IDE from Firefox browser toolbar. Atlantis Software | www.TestingGeek.atlantissw.com www.com .

TestingGeek.com www.IDE Explained Atlantis Software | www.atlantissw.com .

Tools – Selenium IDE Ensure that Selenium IDE is in recording mode. Save the test case as google_ide Run the saved test case back again using the IDE.TestingGeek.Exercise Ensure that http://www.TestingGeek.com .co. View the results back in the IDE Atlantis Software | www.com is the first link for Google search on “Testing Geek” • • • • • • • • Open http://www.Geek” is present at the first place.uk in Firefox Open Selenium IDE. Type “Testing Geek” in the Google search bar and click Search On the search results verify that – “Software Testing .com www.atlantissw.google.

atlantissw.TestingGeek.com www.com .. Atlantis Software | www.Selenium IDE contd.

atlantissw.com .Test Runner Atlantis Software | www.TestingGeek.com www.

Atlantis Software | www.com . • Complexity – It is difficult to use Selenium IDE for checking complex test cases involving dynamic contents. • Language – Selenium IDE can execute scripts created in Selenese only.TestingGeek. It can not be used for different browsers.atlantissw.Limitations • Browser – Selenium IDE is only available for the Firefox.com www.

com .What Next?? Atlantis Software | www.TestingGeek.com www.atlantissw.

atlantissw. written in Java and so available on all the platforms. • Bundles Selenium Core and automatically loads into the browser Atlantis Software | www.Selenium Remote Control • A server. • Acts as a proxy for web requests from them.TestingGeek. • Client libraries for many popular languages.com www.com .

TestingGeek.com .How it works Atlantis Software | www.com www.atlantissw.

com www.openqa.atlantissw. • Downloaded Selenium RC from http://www. • Change directory to the Selenium Server on the command line or terminal.com .Install & Start • Ensure that JDK is present on the machine and is in the class path.org • Unzip to any directory on your file system.TestingGeek. Atlantis Software | www. • Start Selenium Server.

com .atlantissw.TestingGeek.Change Directory to Selenium Server Start selenium Server Atlantis Software | www.com www.

For this exercise. C-Sharp … and so on.Selenium client drivers • Enables communication with Selenium Remote Control Server.com www.atlantissw.com . • Give access to the rich features and libraries of the language. Java. • Which one you should use? – Whatever make sense in your context. Python.TestingGeek. we will use Ruby. Atlantis Software | www. • Functionality of Selenium is exposed via these drivers. including their unit testing framework. • Makes it possible to develop automated scripts in the same language as product. • Available in Ruby.

com .What is Ruby??? • It is object oriented scripting language • Download from http://www. • Python's ease of use and learning. and • Perl's pragmatism.TestingGeek. Atlantis Software | www.atlantissw.org • According to official Ruby Website. Ruby is the successful combination of: • Smalltalk's conceptual elegance.com www.ruby-lang.

• Check content of the directory where Selenium was unzipped initially. • Open a separate command prompt and change its directory to the Ruby Driver. • Your automation script can live anywhere in the file system as long as path is set properly.TestingGeek. Atlantis Software | www.com .atlantissw.com www.Ruby Client Driver • Ruby driver is bundled with the product itself.

TestingGeek.atlantissw. same as first exercise.com .com www. Atlantis Software | www. • Export this test case as ruby. • Analyze the test script.Lets Start • Record a sample script in Selenium IDE.

Client Driver and ruby unit testing framework Setup is executed before every test case.atlantissw.com . Test case. Browser Tear down is executed after every test case and kills selenium and browser. Steps Atlantis Software | www.TestingGeek. gives selenium object and launches browser.com www.

atlantissw.TestingGeek.com .com www.Run it !!! Loading/ Runnning a ruby test case with ruby command Atlantis Software | www.

com . • Can be used to automate complex test cases. robust and scalable automation. • Have access to the complete features / libraries of the high level language.com www.atlantissw. Atlantis Software | www.Selenium RC Benefits • Can be used for any Java Script enabled browser. • Makes it possible to create fast.TestingGeek.

screenshot and so on.com .alephzarro.Interesting Stuff • Element Locators – Based on XPath. Atlantis Software | www.TestingGeek. eval.com/download – Based on DOM • Element Filters – Based on Index – Based on Value • Regular expression • WaitForXXX . use XPather from http://xpath.atlantissw.com www.

com • Visit www.org for official documentation.com Thank You!!! Atlantis Software | www. Contact us ☺ – info@atlantissw.TestingGeek. • Selenium articles on http://www.com – testinggeek@gmail.TestingGeek.com www.com . troubleshooting and information on support.atlantissw.openqa.What if I have Questions? • Well.

TestingGeek.com www.QUESTIONS?? Atlantis Software | www.com .atlantissw.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->