SEMINAR
SELENIUM
SELENIUM
contents:
•What is Selenium.
•Selenium Features comparing to QTP.
•Components of Selenium.
•Selenium IDE
•Selenium RC
•Selenium Grid
•Selenese
•Testing With Selenium
FEATURES OF SELENIUM
• Selenium is a Functional Automation tool for Web applications.
• Selenium is an open source tool (No cost Involved in it).
• Selenium supports the languages like HTML, Java, PHP, Perl,
Python, Ruby and C#.
• It supports the browsers like IE, Mozilla Firefox, Safari, Google
Chrome and Opera.
• It supports the operating systems like Windows, Linux and Mac.
• It is very flexible when compared to QTP and other functional
tools, because it supports multiple languages.
COMPONETS OF SELENIUM
• Selenium is mainly built on 3 components.
1.Selenium IDE
2.Selenium RC
3.Selenium Grid
SELENIUM IDE
• IDE stands for Integrated Development Environment.
• Which is used for Record and Play back the scripts.
• It is an Add on for Mozilla Firefox, which means we can download
the Selenium IDE from Mozilla Firefox and we can Record and Run
the scripts in Mozilla Firefox only.
• Selenium IDE is accountable for user actions.
• We can Run the Recorded scripts against other browsers by using
Selenium RC.
SELENIUM RC
• RC stands for Remote Control.
• It is a Server and launches the Browser.
• It acts as a API and Library of Selenium.
• We need to configure the Selenium RC with the
supported language, then we can automate the
application.
SELENIUM GRID
• Selenium Grid is used for launching the multiple
browsers with supported operating system in
parallel.
• We can run the scripts on different browsers in
parallel.
• It allows you to easily run multiple tests in
parallel, on multiple machines, in a
heterogeneous environment.
SELENESE
• Selenium commands, often called selenese. The set of these
commands are nothing but test script.
• If you want to write test scripts for any application, initially you need
to integrate Selenium with Java by using Eclipse. (check the
Integration doc).
• After completion of the integration, First we need to create the
selenium object as below.
DefaultSelenium selenium=new DefaultSelenium(“System address”,
”Port no of selenium”, “Browser to launch”, “url”).
SELENESE
Generally we use the below selenium commands to work on any application:
• Start(): To launch the Browser.
• Open(): To open the url.
• Close(): To kill or close the Browser.
• windowMaximize(): To maximize the window.
• Type(): To enter some text into a text box.
• Click(): To click on Button, Radio button and Link.
• Select(): To select a value or label from combo box or list box or
Drop down.
SELENESE
• Check(): To check the check box.
• selectPopUp(): To identify the pop up window.
• selectWindow(): To identify the child window.
• selectFrame(): To identify the frame.
• getAlert(): To Click ok on alert box.
• getConfirmation(): To click ok on confirmation message.
• chooseCancelOnNextConfirmation(): To click Cancel on next displayed
confirmation message.
• chooseOkOnNextConfirmation(): To click Cancel on next displayed
confirmation message.
TESTING WITH SELENIUM
• We can perform Regression testing with selenium by writing Reusable
Scripts in the form of Functions or Methods.
• We can perform Retesting with looping concepts.
• We can validate the application by using conditional statements.
• We can perform Database testing.
• Reporting of the test results.
• Error handling, particularly unexpected errors.
• Test case grouping
• Re-execution of failed test cases.
Selenium Framework
Selenium
Driver Script
Environment
Test Cases
Test Results
Test Data
OR
App U T
Selenium Framework drives as below:
• The execution of the script starts, based on the ‘Selenium Driver Script’.
• ‘Selenium Driver Script’ takes the Url from Environment folder and Test cases form
‘Test Cases’ folder as an input.
• In the ‘Test Cases’ folder, all the test cases will be stored and these test cases will
take the test data from ‘Test Data’ folder and OR from ‘Object Repository’ folder.
• After completion of the execution, the results will be stored in ‘Results’ folder. It
contains
– Result as ‘Pass’ or ‘Fail’ with the entire test cases what we have given for
execution.
– All the screen shots of executed test cases.
• If test cases are not available in the ‘Test Cases’ folder then the framework will still
export the results into result folder saying that there are no test cases are available.
Advantages:
1. Selenium is pure open source, freeware and portable tool.
2. Selenium supports variety of languages that include Java, Perl, Python, C#,
Ruby, Groovy, Java Script, and VB Script. etc.
3. Selenium supports many operating systems like Windows, Macintosh, Linux,
Unix etc.
4. Selenium supports many browsers like Internet explorer, Chrome, Firefox,
Opera, Safari etc.
5. Selenium can be integrated with ANT or Maven kind of framework for source
code compilation.
Disadvantages:
1. Selenium needs very much expertise resources. The resource should also
be very well versed in framework architecture.
2. Selenium only supports web based application and does not support
windows based application.
3. It is difficult to test Image based application.
4. Selenium need outside support for report generation activity like
dependence on TestNG or Jenkins.
5. Selenium does not support built in add-ins support.
Thank you!
ValueLabs

Selenium ppt

  • 1.
  • 2.
    SELENIUM contents: •What is Selenium. •SeleniumFeatures comparing to QTP. •Components of Selenium. •Selenium IDE •Selenium RC •Selenium Grid •Selenese •Testing With Selenium
  • 3.
    FEATURES OF SELENIUM •Selenium is a Functional Automation tool for Web applications. • Selenium is an open source tool (No cost Involved in it). • Selenium supports the languages like HTML, Java, PHP, Perl, Python, Ruby and C#. • It supports the browsers like IE, Mozilla Firefox, Safari, Google Chrome and Opera. • It supports the operating systems like Windows, Linux and Mac. • It is very flexible when compared to QTP and other functional tools, because it supports multiple languages.
  • 4.
    COMPONETS OF SELENIUM •Selenium is mainly built on 3 components. 1.Selenium IDE 2.Selenium RC 3.Selenium Grid
  • 5.
    SELENIUM IDE • IDEstands for Integrated Development Environment. • Which is used for Record and Play back the scripts. • It is an Add on for Mozilla Firefox, which means we can download the Selenium IDE from Mozilla Firefox and we can Record and Run the scripts in Mozilla Firefox only. • Selenium IDE is accountable for user actions. • We can Run the Recorded scripts against other browsers by using Selenium RC.
  • 6.
    SELENIUM RC • RCstands for Remote Control. • It is a Server and launches the Browser. • It acts as a API and Library of Selenium. • We need to configure the Selenium RC with the supported language, then we can automate the application.
  • 7.
    SELENIUM GRID • SeleniumGrid is used for launching the multiple browsers with supported operating system in parallel. • We can run the scripts on different browsers in parallel. • It allows you to easily run multiple tests in parallel, on multiple machines, in a heterogeneous environment.
  • 8.
    SELENESE • Selenium commands,often called selenese. The set of these commands are nothing but test script. • If you want to write test scripts for any application, initially you need to integrate Selenium with Java by using Eclipse. (check the Integration doc). • After completion of the integration, First we need to create the selenium object as below. DefaultSelenium selenium=new DefaultSelenium(“System address”, ”Port no of selenium”, “Browser to launch”, “url”).
  • 9.
    SELENESE Generally we usethe below selenium commands to work on any application: • Start(): To launch the Browser. • Open(): To open the url. • Close(): To kill or close the Browser. • windowMaximize(): To maximize the window. • Type(): To enter some text into a text box. • Click(): To click on Button, Radio button and Link. • Select(): To select a value or label from combo box or list box or Drop down.
  • 10.
    SELENESE • Check(): Tocheck the check box. • selectPopUp(): To identify the pop up window. • selectWindow(): To identify the child window. • selectFrame(): To identify the frame. • getAlert(): To Click ok on alert box. • getConfirmation(): To click ok on confirmation message. • chooseCancelOnNextConfirmation(): To click Cancel on next displayed confirmation message. • chooseOkOnNextConfirmation(): To click Cancel on next displayed confirmation message.
  • 11.
    TESTING WITH SELENIUM •We can perform Regression testing with selenium by writing Reusable Scripts in the form of Functions or Methods. • We can perform Retesting with looping concepts. • We can validate the application by using conditional statements. • We can perform Database testing. • Reporting of the test results. • Error handling, particularly unexpected errors. • Test case grouping • Re-execution of failed test cases.
  • 12.
    Selenium Framework Selenium Driver Script Environment TestCases Test Results Test Data OR App U T
  • 13.
    Selenium Framework drivesas below: • The execution of the script starts, based on the ‘Selenium Driver Script’. • ‘Selenium Driver Script’ takes the Url from Environment folder and Test cases form ‘Test Cases’ folder as an input. • In the ‘Test Cases’ folder, all the test cases will be stored and these test cases will take the test data from ‘Test Data’ folder and OR from ‘Object Repository’ folder. • After completion of the execution, the results will be stored in ‘Results’ folder. It contains – Result as ‘Pass’ or ‘Fail’ with the entire test cases what we have given for execution. – All the screen shots of executed test cases. • If test cases are not available in the ‘Test Cases’ folder then the framework will still export the results into result folder saying that there are no test cases are available.
  • 14.
    Advantages: 1. Selenium ispure open source, freeware and portable tool. 2. Selenium supports variety of languages that include Java, Perl, Python, C#, Ruby, Groovy, Java Script, and VB Script. etc. 3. Selenium supports many operating systems like Windows, Macintosh, Linux, Unix etc. 4. Selenium supports many browsers like Internet explorer, Chrome, Firefox, Opera, Safari etc. 5. Selenium can be integrated with ANT or Maven kind of framework for source code compilation.
  • 15.
    Disadvantages: 1. Selenium needsvery much expertise resources. The resource should also be very well versed in framework architecture. 2. Selenium only supports web based application and does not support windows based application. 3. It is difficult to test Image based application. 4. Selenium need outside support for report generation activity like dependence on TestNG or Jenkins. 5. Selenium does not support built in add-ins support.
  • 16.