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 |

• • • • • • Introduction to Selenium Selenium IDE – Lets play Limitations of Selenium IDE Selenium RC – Play Again Ruby with Selenium RC Discussion / Questions

Atlantis Software |

What is Selenium?

Atlantis Software |

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

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 . Atlantis Software | www.

com .atlantissw.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.

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

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

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

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

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

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

com .atlantissw.Test Runner Atlantis Software | www.

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

com .What Next?? Atlantis Software | www.

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

atlantissw.How it works Atlantis Software | www.

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

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

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

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

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

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

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

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

• Makes it possible to create fast.atlantissw. robust and scalable automation. Atlantis Software | www. • Can be used to automate complex test . • Have access to the complete features / libraries of the high level www.Selenium RC Benefits • Can be used for any Java Script enabled browser. . Atlantis Software | www. screenshot and so – Based on DOM • Element Filters – Based on Index – Based on Value • Regular expression • WaitForXXX .com www.Interesting Stuff • Element Locators – Based on XPath. use XPather from http://xpath. eval.

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

QUESTIONS?? Atlantis Software | .atlantissw.

Sign up to vote on this title
UsefulNot useful