Text Selenium server 31 – October - 2014 By, Vivek Singh Jeena Inderpreet Singh Ankusha Saxena Bhanupriya D.P Shubham Yadav Madhavi Aminigadda.

Slides:



Advertisements
Similar presentations
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Advertisements

Test Automation with Selenium
Pubman and Selenium tests. What is Selenium Selenium is a suite of Web application test automation tools for any browser on any operating system –Firefox,
Microsoft Excel 2003 Illustrated Complete Excel Files and Incorporating Web Information Sharing.
Selenium HP Web Test Tool Training
XP Information Technology Center - KFUPM1 Microsoft Office FrontPage 2003 Creating a Web Site.
Create slices and hotspots Create links in Web pages Create rollovers from slices Create basic animation Add tweening symbol instances to create animation.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Chapter 1 Getting Started With Dreamweaver. Explore the Dreamweaver Workspace The Dreamweaver workspace is where you can find all the tools to create.
Selenium – Testing Tool. What is Selenium? Selenium is a robust set of tools that supports rapid development of test automation for web-based applications.
Lesson 46: Using Information From the Web copy and paste information from a Web site print a Web page download information from a Web site customize Web.
Selenium Web Test Tool Training Using Ruby Language Discover the automating power of Selenium Kavin School Kavin School Presents: Presented by: Kangeyan.
Automation using Selenium Authored & Presented by : Chinmay Sathe & Amit Prabhu Cybage Software Pvt. Ltd.
1 ADVANCED MICROSOFT WORD Lesson 15 – Creating Forms and Working with Web Documents Microsoft Office 2003: Advanced.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Chapter 3. Table have many uses in a HTML design but are mostly used for the organization of your web site. Tables also give vertical and horizontal structure.
Chapter 4 Dreamweaver: Part II The Web Warrior Guide to Web Design Technologies.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Val Kravets, Luis Sanchez, Allen Chung, Phillip Anderson, Leyla Norooz, Brian Ramnarian, Todd Watson.
Selenium Web Test Tool Training Using Ruby Language Discover the automating power of Selenium Kavin School Kavin School Presents: Presented by: Kangeyan.
© 2012 LogiGear Corporation. All Rights Reserved Robot framework.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
Creating a Web Site to Gather Data and Conduct Research.
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
HOW WEB SERVER WORKS? By- PUSHPENDU MONDAL RAJAT CHAUHAN RAHUL YADAV RANJIT MEENA RAHUL TYAGI.
Chapter 6 Generating Form Letters, Mailing Labels, and a Directory
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
Domain 3 Understanding the Adobe Dreamweaver CS5 Interface.
Microsoft Access 2000 Presentation 2 Creating Databases Part I (Creating Tables)
Training Guide for Inzalo SOP Users. This guide has been prepared to demonstrate the use of the Inzalo Intranet based SOP applications. The scope of this.
Key Applications Module Lesson 21 — Access Essentials
 Whether using paper forms or forms on the web, forms are used for gathering information. User enter information into designated areas, or fields. Forms.
Web Automation Testing With Selenium By Rajesh Kanade.
Microsoft Access 2010 Chapter 10 Administering a Database System.
Pubman and Selenium tests. What is Selenium Selenium is a suite of Web application test automation tools for any browser on any operating system –Firefox,
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
Microsoft FrontPage 2003 Illustrated Complete Creating a Form.
1 Building FORMS In When a visitor enters information into a web form displayed in a web browser and clicks the submit button, the information is sent.
Darek Sady - Respondus - 3/19/2003 Using Respondus Beginner to Basic By: Darek Sady.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Chapter 1 Getting Started With Dreamweaver. Exploring the Dreamweaver Workspace The Dreamweaver workspace is where you can find all the tools to create.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
Introduction Selenium IDE is a Firefox extension that allows you to record, edit, and debug tests for HTML Easy record and playback Intelligent field selection.
Lec 18 Web with Selenium 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 16 Testing Web Applications 10/23/
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Automated Web Page Testing with Selenium IDE: An Overview Mary Ann May-Pumphrey 11/20/08.
Test Automation For Web-Based Applications Portnov Computer School 1 Selenium HP Web Test Tool Training.
Selenium Date:06/10/2009. May 13, Agenda Testing – Test Automation Selenium – Introduction – Features – Supported platforms Selenium Commands –
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
Microsoft Office 2013 Try It! Chapter 4 Storing Data in Access.
SELENIUM By- Vivek Singh Jeena, Inderpreet Singh, Ankusha Saxena, Bhanupriya D.P, Shubham Yadav, Madhavi Aminigadda.
Selenium server By, Kartikeya Rastogi Mayur Sapre Mosheca. R
Test Automation Using Selenium Presented by: Shambo Ghosh Ankit Sachan Samapti Sinhamahapatra Akshay Kotawala.
Selenium & Web Accessibility Nishant Singh Sumedha Mitra Vivek Gupta Vishesh Mangal Biswajeet Mandal Srivash Kangsabanik.
Perfecto Mobile Automation
Microsoft Office 2008 for Mac – Illustrated Unit D: Getting Started with Safari.
Tata Consultancy Services1 WebDriver Basics Submitted By : Akhil K Gagan Deep Singh Naveenrajha H M Poornachandra Meduri Shubham Utsav Sunil Kumar G Vivek.
What Is Firefox? __________ is a Web ___________ that you use to search for and view Web pages, save pages for use in the future, and maintain a list.
XP New Perspectives on Creating Web Pages With Word Tutorial 1 1 Creating Web Pages With Word Tutorial 1.
C Copyright © 2009, Oracle. All rights reserved. Using SQL Developer.
Arklio Studija 2007 File: / / Page 1 Automated web application testing using Selenium
In this session, you will learn to:
JRA2: Acceptance Testing senarious
CSCE 747 Software Testing and Quality Assurance
Selenium Tutorials Cheyat Training.
Selenium IDE Installation and Use.
Presentation transcript:

Text Selenium server 31 – October By, Vivek Singh Jeena Inderpreet Singh Ankusha Saxena Bhanupriya D.P Shubham Yadav Madhavi Aminigadda

CONFIDENTIAL Selenium is a robust set of tools that supports rapid development of test automation for web based applications. It is possibly the most widely used open source solution for assisting with the development of test automation. It provides a rich test of testing functions specifically geared to the needs of testing of a web application. SELENIUM

CONFIDENTIAL SELENIUM It provides the support for executing one's tests on multiple browser platforms. It is composed of four major tools :  Selenium IDE  Selenium RC(Remote Control)  Selenium Web Driver  Selenium Grid

CONFIDENTIAL Test automation means using a tool to run repeatable test against the target application whenever necessary. The advantages of automation testing are related to the repeatability of the tests and the speed at which the test can be executed. Automation testing supports : - Frequent regression testing. - Rapid feedback to developers during the development process. WHY AUTOMATION TESTING?

CONFIDENTIAL WHY AUTOMATION TESTING? Virtually unlimited iterations of test case execution Customized reporting of application defects Support for Agile and eXtreme development methodologies Disciplined documentation of test cases Finding defects missed by manual testing

CONFIDENTIAL Selenium first came to life in 2004, when Jason Huggins was testing an internal application at ThoughtWorks. He realized there were better uses of his time than manually stepping through the same tests with every change he made. He developed a Javascript library that could drive interactions with the page, allowing him to automatically rerun tests against multiple browsers. That library eventually became Selenium Core, which underlies all the functionality of Selenium Remote Control (RC) and Selenium IDE. Selenium RC was ground-breaking because no other product allowed you to control a browser from a language of your choice. HISTORY

CONFIDENTIAL HISTORY In 2006 a plucky engineer at Google named Simon Stewart started work on a project he called WebDriver. The WebDriver project began with the aim to solve the Selenium pain-points. But, the most important story of that year was the merging of Selenium and WebDriver. The joining of the two tools provided a common set of features for all users.

CONFIDENTIAL Selenium IDE : Architecture Doesn’t required to start server before executing the test script. It is a GUI Plug-in. It only works in Mozilla browser. Core engine is Javascript based

CONFIDENTIAL Selenium RC : Architecture

CONFIDENTIAL Selenium Web driver : Architecture

CONFIDENTIAL Selenium in Action Selenium is a package of various test components which consists of the following three major tools. Each one has a specific role in aiding the development of test automation for a Web application. Selenium IDE – A Firefox extension to record test cases and suites. Selenium RC – Used to run tests on different browsers and systems. Selenium Grid – Runs multiple instances of Selenium RC at once. Selenium Web Driver : Web Driver is a web automation framework that allows you to execute your tests against different browsers, not just Firefox (unlike Selenium IDE).

CONFIDENTIAL Selenium : Web driver

CONFIDENTIAL Selenium : Web driver Web Driver is a web automation framework that allows you to execute your tests against different browsers, not just Firefox (unlike Selenium IDE). WebDriver also enables you to use a programming language in creating your test scripts(not possible in Selenium IDE). You can now use conditional operations like if-then-else or switch- case You can also perform looping like do-while. Selenium WebDriver is the successor to Selenium RC. Selenium WebDriver accepts commands (sent in Selenese, or via a Client API) and sends them to a browser. This is implemented through a browser-specific browser driver, which sends commands to a browser, and retrieves results. Most browser drivers actually launch and access a browser application (such as Firefox or Internet Explorer); there is also an HtmlUnit browser driver, which simulates a browser using HtmlUnit.

CONFIDENTIAL SELENIUM IDE Introduction Developed independently by Shinya Kasatani and was merged in Selenium in A plugin in Mozilla Firefox. Works on all three major platforms – Windows, Mac and Linux. Selenium IDE can record user interactions with the web browser and play them back to test for errors. Selenium IDE enables us to test web applications with zero knowledge of any test scripting language.

CONFIDENTIAL Installing selenium Open

CONFIDENTIAL Click on Download Selenium Click on the current release version of the Selenium IDE

CONFIDENTIAL For security, a Firefox notification will pop up. Click on "Allow." Wait until Firefox completes the download and then click "Install Now."

CONFIDENTIAL After Firefox has restarted, launch Selenium IDE using either of two ways:  By pressing Ctrl+Alt+S  By clicking on the Firefox menu button > Web Developer> Selenium IDE Wait until installation is completed. In the pop-up window, click "Restart Now."

CONFIDENTIAL Selenium IDE basics Selenium IDE should launch as shown. Create a new test case by going to File -> New Test Case.

CONFIDENTIAL Type in Google.com into your Firefox address bar: On the Google.com homepage, search for any query. For this example, we used the query ‘automated testing. Once the results page opens, stop the test by clicking the red toggle switch. We are now going to record our test. To do this, hit the red record switch to the right.

CONFIDENTIAL Now that we’ve recorded the test, let’s play it back. This is what your ‘Table’ pane should look like now: Click on the ‘Play current test case’ button.

TCS Confidential Selenium IDE

TCS Confidential Selenium IDE : UI 1. Menu bar - The menu bar has options to add, open and save test scripts and test suites. It also has some general edit options and it is even possible to specify a preferred programming language. 2. Base URL - Allows test scripts to be run across different domains.

TCS Confidential – Speed Control: Controls how fast your test script runs. – Run All: Run all test scripts in Selenium IDE. – Run: Run a single test script in Selenium IDE. 3. Tool bar - The buttons in the tool bar are used to control the test scripts. Each button is explained below (starting from the left):

TCS Confidential – Pause/Resume: Pause a running test script. – Step: Step through the test script once it has been paused. – Apply Rollup Rules: This allows us to group a sequence of actions into a single action. – Record: The record button. It will be enabled when Selenium IDE is recording.

CONFIDENTIAL 4. Test script pane - The test script commands are displayed in the test script pane. There is one tab which shows us the script in the three-column table format. The other tab shows us the script in a preferred language.

TCS Confidential The Command, Target and value textfields are corresponding to the three-column table structure. It is possible to edit the values by clicking on a specific row. Those three fields are explained below:

TCS Confidential – Command: This select box has a list of all the Selenium commands. It is possible to type into it to use the auto complete functionality or use it as a dropdown. Some reference information is shown in the reference pane at the bottom once a specific action is selected. – Action: The first parameter specified for a command in the Reference tab of the bottom pane always goes in the Target field. – Value: If a second parameter is specified by the Reference tab, it always goes in the Value field.

TCS Confidential 5. Test suite pane - Shows the test scripts in the current test-suite along with the results. Log/Reference pane

TCS Confidential The bottom pane is used for four different functions divided in separate tabs, like : Log, Reference, UI-Element, and Rollup information. Each function is explained below: – Log: Error messages and information messages are shown while the test is running. – Reference: Displays the documentation of the command actually selected. – UI-Element: Displays the UI-element mappings actually in use. – Rollup: Shows rollup rules.

TCS Confidential Recording a Test Open Selenium IDE and enter the Base URL. Click on Record Button

TCS Confidential Open URL in Mozilla Firefox. Enter the details and login if required. Go to Selenium IDE and stop the recording. The commands will be present in the Test Script Pane. During recording, Selenium-IDE will automatically insert commands into your test case based on your actions. Typically, this will include: * clicking a link - click or clickAndWait commands * entering values - type command * selecting options from a drop-down list box - select command * clicking checkboxes or radio buttons - click command

TCS Confidential Opening and Saving a Test Case However, Selenium distinguishes between test cases and test suites. To save Selenium-IDE tests, we can either save the individual test cases, or save the test suite. When we open an existing test case or suite, Selenium-IDE displays its Selenium commands in the Test Case Pane.

TCS Confidential Running Test Cases We can run a test case all at once, stop and start it, run it one line at a time, run a single command we are currently developing, and we can do a batch run of an entire test suite. Run a Test Case - Click the Run button to run the currently displayed test case. Run a Test Suite - Click the Run All button to run all the test cases in the currently loaded test suite. Stop and Start - The Pause button can be used to stop the test case while it is running. The icon of this button then changes to indicate the Resume button. To continue click Resume.

TCS Confidential Stop in the Middle - We can set a breakpoint in the test case to cause it to stop on a particular command. This is useful for debugging our test case. To set a breakpoint, select a command, right-click, and from the context menu select Toggle Breakpoint. Start from the Middle - You can tell the IDE to begin running from a specific command in the middle of the test case. This also is used for debugging. To set a startpoint, select a command, right-click, and from the context menu select Set/Clear Start Point. Run Any Single Command - Double-click any single command to run it by itself. This is useful when writing a single command. It lets you immediately test a command you are constructing, when you are not sure if it is correct. You can double-click it to see if it runs correctly. This is also available from the context menu.

TCS Confidential Exporting Test Cases

CONFIDENTIAL Selenese Commands A selenese command refers to what Selenium has to do. Commands in selenium are of three types. Some example of Selenium IDE commands are - open - Opens an URL in the test frame. This accepts both relative and absolute URLs. verifyLocation - Verifies that we have navigated to a particular URL. type - The target is the CSS selector for the element. The value is the value you wish to enter in the input field. click - Clicks on a link, button, checkbox or radio button. clickAndWait - Clicks on a link, button, checkbox or radio button and waits for the page to load

CONFIDENTIAL Selenese Commands check - Checks a radio button or checkbox. verifyVisible - Returns true if the specified element is visible, false otherwise determines if the specified element is visible. An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one if its ancestors. This method will fail if the element is not present. verifyNotVisible - Returns true if the specified element is not visible, false otherwise. The element must be present in the HTML document but not visible. verifyElementPresent - Verifies that the specified element is somewhere on the page even if it is not visible. verifyElementNotPresent - Verifies that the element is not present any where in the HTML document.

TCS Confidential Create Commands

CONFIDENTIAL Verifying Page Elements Verifying UI elements on a web page. Selenese allows multiple ways of checking for UI elements. It is important that you understand these different methods because these methods define what you are actually testing.

CONFIDENTIAL Assertion or Verification Choosing between “assert” and “verify” comes down to convenience and management of failures. Effectively an “assert” will fail the test and abort the current test case, whereas a “verify” will fail the test and continue to run the test case. The best use of this feature is to logically group your test commands, and start each group with an “assert” followed by one or more “verify” test commands. An example follows:

CONFIDENTIAL Creating Test Suites contd. The Test suite that contains GoogleSignUpForm and GoogleSignUpErrors:

CONFIDENTIAL Assertion or Verification contd... The above example first “asserts” that the correct page is loaded by comparing the title. Only if this passes will the following command run and “verify” that the text is present in the expected location. The test case then “asserts” the first column in the second row of the first table contains the expected value and only if this passed will the remaining cells in that row be “verified”.

CONFIDENTIAL Assertion or Verification Commands VerifyTextPresent : The command verifyTextPresent is used to verify specific text exists somewhere on the page. VerifyElementPresent : Use this command when you must test for the presence of a specific UI element, rather than its content. VerifyText : Use verifyText when both the text and its UI element must be tested. verifyText must use a locator. verifyTitle/assertTitle : verifies an expected page title. AssertAlert : it will verify text and take action on alert box but if alert text not matches then it will stop execution. AssertAlertNotPresent : this command will becomes pass successfully if there is not any alert on page of your software web application during its execution. AssertAlertPresent : this command will be executed without any error if there is any alert message present on web application page

CONFIDENTIAL Creating Test Suites A test suite, less commonly known as a validation suite, is a collection of test cases that are intended to be used to test a software program to show that it has some specified set of behaviours. To create a test suite in Selenium IDE: Open Selenium IDE Go to File>New Test Suite To add test cases: Go to File>Add test case Navigate to the location of your test case Click on Add Repeat steps 3-5 for more test cases

CONFIDENTIAL Exporting a Test Case

CONFIDENTIAL Other features Importing test case(s). The Edit menu allows copy, paste, delete, undo, and select all operations for editing the commands in your test case. Actions menu allows users to record, play entire test suite, play current test case, play or pause, play fast or slow, set break point, and execute current test step. Options menu allows users to change options of IDE, export test case to multiple language format, and clear history. Help menu allows users to view documentation, UI-Element documentation and navigate to Selenium websites. The toolbar contains buttons for controlling the execution of your test cases, including a step feature for debugging your test cases.

CONFIDENTIAL SUMMARY In an era of highly interactive and responsive software processes where many organizations are using some form of Agile methodology, test automation is frequently becoming a requirement for software projects. Test automation means using a software tool to run repeatable tests against the application to be tested. Selenium is possibly the most widely-used open source solution tool available for assisting with the development of test automation.

CONFIDENTIAL SELENIUM Selenium is a robust set of tools that supports rapid development of test automation for web-based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. Selenium operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.

CONFIDENTIAL Selenium Features: Supports Cross Browser Testing. The Selenium tests can be run on multiple browsers. Allows scripting in several languages like Java, C#, PHP and Python. Assertion statements provide an efficient way of comparing expected and actual results. Inbuilt reporting mechanism. Selenium Components: Selenium IDE Selenium Remote Control Selenium Web Driver Selenium Grid

CONFIDENTIAL Assert command in selenium: When an "assert" command fails then test execution will be aborted. Assert is best used when the check value has to pass for the test to be able to continue to run. Example: log in. Verify command in selenium: When a "verify" command fails then test will continue executing and logging the failure. Verify is best used to check non critical things. Example: presence of a headline element.

Text THANK YOU