Introduction to selenium

21
Introduction to Selenium ARCHANA KRUSHNAN

Transcript of Introduction to selenium

Page 1: Introduction to selenium

Introduction to SeleniumARCHANA KRUSHNAN

Page 2: Introduction to selenium

Agenda

Introduction and History What is Selenium Components of Selenium Selenium RC Selenium WebDriver Selenium Grid Selenium IDE Why Selenium over other tools ?

Page 3: Introduction to selenium

Introduction

Selenium automates browsers.  Its open source- Completely Free, all you need is a system and

internet. Selenium can be executed on multiple platforms can be controlled by many programming languages and testing

frameworks. Support provided from several other open source tools like

Jenkins, ANT etc. Can be integrated with several defect tracking tools.

Page 4: Introduction to selenium

History

Was developed by Jason Huggins in 2004 . He was a working on a in-house project in Thoughtworks. He started working on Selenium Core.

Dan Fabulich and Nelson Sproul, Created Selenium RC. Shinya Kasatani in Japan became interested in Selenium, and

realised that he could wrap the core code into an IDE module into the Firefox browser, and be able to record tests as well as play them back in the same plugin. 

Page 5: Introduction to selenium

What is Selenium ?

Selenium is a robust tool that supports rapid development of test automation for web-based applications.

Can simulate a user navigating through pages and then assert for specific marks on the pages

Open source, web-based testing automation tool and cross-browser compliant

Open source tool Easy to use

Page 6: Introduction to selenium

Selenium Compatibility

Multiple Browser

Compatibility

• Firefox• Chrome• Safari• Opera

Multiple OS Compatibilit

y

• Windows• Mac• Android• IOS• Linux

Multiple Language Support

• Java• Perl• C#• Ruby

Selenium

Page 7: Introduction to selenium

Selenium Components

Selenium

Selenium RC

Selenium Web

DriverSelenium

GridSelenium

IDE

Page 8: Introduction to selenium

Selenium RC (Remote Control)

Selenium-RC provides an API (Application Programming Interface) and library for each of its supported languages: HTML, Java, C#, Perl, PHP, Python, and Ruby.

This ability to use Selenium-RC with a high-level programming language to develop test cases also allows the automated testing to be integrated with a project’s automated build environment.

Also known as Selenium 1

Page 9: Introduction to selenium

How Selenium RC works ?

Page 10: Introduction to selenium

Selenium Web Driver

Selenium WebDriver is the successor of Selenium Remote Control which has been officially deprecated

Selenium WebDriver is a collection of language specific bindings to drive a browser .

WebDriver is designed in a simpler and more concise programming interface along with addressing some limitations in the Selenium-RC API.

Also Known as Selenium 2Selenium 1+ Selenium Web Driver = Selenium 2

Page 11: Introduction to selenium

Java Ruby PythonC# Perl PHP

Language Bindings

Selenium Web Driver

Browsers

IE Firefox Chrome Safari Opera

Page 12: Introduction to selenium

Selenium Grid

Selenium Grid can run large test suites and test that must be run in multiple environments

Tests can be run in parallel with simultaneous execution (different tests on different remote machines)

It allows for running your tests in a distributed test execution environment

Used to run your tests against multiple browsers, multiple versions of browser, and browsers running on different operating systems

It reduces the time it takes for the test suite to complete a test pass

Page 13: Introduction to selenium
Page 14: Introduction to selenium

Selenium IDE

If you want to create quick bug reproduction scripts or create scripts to aid in automation-aided exploratory testing, then Selenium IDE is the best.

Selenium IDE is an integrated development environment for Selenium scripts

Its an add on with firefox. It has record and play back functionality, Though it can record

only record on firefox, it can be modified to run in webdriver and RC.

The tests can be modified, assertions can be added and test suite can be created.

Page 15: Introduction to selenium

Features of Selenium IDE

Easy record and playback Intelligent field selection will use IDs, names, or XPath as needed Autocomplete for all common Selenium commands Walk through tests Debug and set breakpoints Save tests as HTML, Ruby scripts, or any other format Support for Selenium user-extensions.js file Option to automatically assert the title of every page

Page 16: Introduction to selenium
Page 17: Introduction to selenium

Why Selenium Over other tools?

Most powerful Open Source Automation tool available. Flexible with support to many languages Highly extensible Platform Support– Provides support on wide range of OS

compared to any other tool Parallel Testing- Supports parallel Testing Usability – Easy to use. ALM Integration – Provides integration with several bug

tracking tools.

Page 18: Introduction to selenium

Feature Selenium QTPRecord and Play back Yes Yes

Language Support

Java, C#,PHP,Python,Perl,Ruby VB Script

OS SupportWindows, Linux, Mac, Andriod, IOS Windows

Ease of Execution Easy Easy

Browser SupportFirefox, IE, Chrome, Opera, Safari IE

Support for Defect managenent integration Several FewAddins and Extensions Several SeveralCost Free Costly

Comparison of QTP over Selenium

Page 19: Introduction to selenium

References

http://www.seleniumhq.org/

https://saucelabs.com/selenium/selenium-grid

http://www.developerfusion.com/

Page 20: Introduction to selenium

Author Biography

Professional History and Credentials:

Archana Krushnan is currently working as Test Analyst at Nihilent Technologies Pvt Ltd. She has been in the field of Software Testing for more than 5 years and worked on several domains such as Telecom, Ecommerce and Healthcare. She has previous experiences of working with companies like Reliance Communications Ltd and Fab.com. Her interests include exploring new things in testing and sharing on her blog..

Page 21: Introduction to selenium

Thank You !!!!

Prepared By : Archana Krushnan

Test Analyst

For any queries Please email,Email : [email protected]