Enviar pesquisa
Carregar
GL_Web application testing using selenium
•
Transferir como PPTX, PDF
•
3 gostaram
•
1,725 visualizações
Pragya Rastogi
Seguir
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 32
Baixar agora
Recomendados
Selenium framework faq
Selenium framework faq
testslideshare_yahoo
Selenium
Selenium
Batch2016
DevLabs Alliance Top 50 Selenium Interview Questions for SDET
DevLabs Alliance Top 50 Selenium Interview Questions for SDET
DevLabs Alliance
Dev labs alliance top 50 selenium interview questions for SDET
Dev labs alliance top 50 selenium interview questions for SDET
devlabsalliance
Selenium Basics by Quontra Solutions
Selenium Basics by Quontra Solutions
QUONTRASOLUTIONS
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
Edureka!
Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...
Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...
Edureka!
Selenium corporate-training-in-mumbai
Selenium corporate-training-in-mumbai
vibrantuser
Recomendados
Selenium framework faq
Selenium framework faq
testslideshare_yahoo
Selenium
Selenium
Batch2016
DevLabs Alliance Top 50 Selenium Interview Questions for SDET
DevLabs Alliance Top 50 Selenium Interview Questions for SDET
DevLabs Alliance
Dev labs alliance top 50 selenium interview questions for SDET
Dev labs alliance top 50 selenium interview questions for SDET
devlabsalliance
Selenium Basics by Quontra Solutions
Selenium Basics by Quontra Solutions
QUONTRASOLUTIONS
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
Edureka!
Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...
Selenium IDE Tutorial For Beginners | What Is Selenium IDE? | Selenium Tutori...
Edureka!
Selenium corporate-training-in-mumbai
Selenium corporate-training-in-mumbai
vibrantuser
Ajit jadhav automation_qa_4_ yrs
Ajit jadhav automation_qa_4_ yrs
Ajit Jadhav
Selenium and JMeter
Selenium and JMeter
ArchanaKalapgar
Selenium and JMeter Testing
Selenium and JMeter Testing
ArchanaKalapgar
Android Automation Testing with Selendroid
Android Automation Testing with Selendroid
Vikas Thange
International journal of applied sciences and innovation vol 2015 - no 1 - ...
International journal of applied sciences and innovation vol 2015 - no 1 - ...
sophiabelthome
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Dave Haeffner
Selenium training in chennai
Selenium training in chennai
Thecreating Experts
C# Security Testing and Debugging
C# Security Testing and Debugging
Rich Helton
Testing Java applications with Maveryx
Testing Java applications with Maveryx
Maveryx
Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4
Lars Vogel
Testing Android applications with Maveryx
Testing Android applications with Maveryx
Maveryx
Robotium Tutorial
Robotium Tutorial
Mobile March
Expert selenium with core java
Expert selenium with core java
Ishita Arora
Android testing
Android testing
Bitbar
Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010
Lars Vogel
Getting Started with Selenium
Getting Started with Selenium
Dave Haeffner
Top 30 Selenium Interview Questions.pptx
Top 30 Selenium Interview Questions.pptx
Syntax Technologies
Selenium Primer
Selenium Primer
gueste1e4db
Selenium
Selenium
Kalyan ch
Top 21 Selenium FAQs.pdf
Top 21 Selenium FAQs.pdf
AnanthReddy38
Making Sense of Selenium
Making Sense of Selenium
SmartBear
Sel
Sel
Sandeep A R
Mais conteúdo relacionado
Mais procurados
Ajit jadhav automation_qa_4_ yrs
Ajit jadhav automation_qa_4_ yrs
Ajit Jadhav
Selenium and JMeter
Selenium and JMeter
ArchanaKalapgar
Selenium and JMeter Testing
Selenium and JMeter Testing
ArchanaKalapgar
Android Automation Testing with Selendroid
Android Automation Testing with Selendroid
Vikas Thange
International journal of applied sciences and innovation vol 2015 - no 1 - ...
International journal of applied sciences and innovation vol 2015 - no 1 - ...
sophiabelthome
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Dave Haeffner
Selenium training in chennai
Selenium training in chennai
Thecreating Experts
C# Security Testing and Debugging
C# Security Testing and Debugging
Rich Helton
Testing Java applications with Maveryx
Testing Java applications with Maveryx
Maveryx
Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4
Lars Vogel
Testing Android applications with Maveryx
Testing Android applications with Maveryx
Maveryx
Robotium Tutorial
Robotium Tutorial
Mobile March
Expert selenium with core java
Expert selenium with core java
Ishita Arora
Android testing
Android testing
Bitbar
Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010
Lars Vogel
Getting Started with Selenium
Getting Started with Selenium
Dave Haeffner
Mais procurados
(16)
Ajit jadhav automation_qa_4_ yrs
Ajit jadhav automation_qa_4_ yrs
Selenium and JMeter
Selenium and JMeter
Selenium and JMeter Testing
Selenium and JMeter Testing
Android Automation Testing with Selendroid
Android Automation Testing with Selendroid
International journal of applied sciences and innovation vol 2015 - no 1 - ...
International journal of applied sciences and innovation vol 2015 - no 1 - ...
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium training in chennai
Selenium training in chennai
C# Security Testing and Debugging
C# Security Testing and Debugging
Testing Java applications with Maveryx
Testing Java applications with Maveryx
Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4
Testing Android applications with Maveryx
Testing Android applications with Maveryx
Robotium Tutorial
Robotium Tutorial
Expert selenium with core java
Expert selenium with core java
Android testing
Android testing
Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010
Getting Started with Selenium
Getting Started with Selenium
Semelhante a GL_Web application testing using selenium
Top 30 Selenium Interview Questions.pptx
Top 30 Selenium Interview Questions.pptx
Syntax Technologies
Selenium Primer
Selenium Primer
gueste1e4db
Selenium
Selenium
Kalyan ch
Top 21 Selenium FAQs.pdf
Top 21 Selenium FAQs.pdf
AnanthReddy38
Making Sense of Selenium
Making Sense of Selenium
SmartBear
Sel
Sel
Sandeep A R
Selenium
Selenium
Anjali Rao
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Simplilearn
Basics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote Control
usha kannappan
Selenium training
Selenium training
Robin0590
Web Testing
Web Testing
muhamedwaseem09
Upcoming new features of selenium in automation testing
Upcoming new features of selenium in automation testing
software testingchennai
Selenium
Selenium
jagdishdevabhaipatel
Interview Question & Answers for Selenium Freshers | LearningSlot
Interview Question & Answers for Selenium Freshers | LearningSlot
Learning Slot
Selenium
Selenium
Satyam Pandey
Selenium ppt
Selenium ppt
Aneesh Rangarajan
A Simple Guide to Selenium Software Testing
A Simple Guide to Selenium Software Testing
Calidad Infotech
Selenium ide made easy
Selenium ide made easy
Narayanan Palani
Selenium interview-questions-freshers
Selenium interview-questions-freshers
Naga Mani
What is selenium
What is selenium
sachin patil
Semelhante a GL_Web application testing using selenium
(20)
Top 30 Selenium Interview Questions.pptx
Top 30 Selenium Interview Questions.pptx
Selenium Primer
Selenium Primer
Selenium
Selenium
Top 21 Selenium FAQs.pdf
Top 21 Selenium FAQs.pdf
Making Sense of Selenium
Making Sense of Selenium
Sel
Sel
Selenium
Selenium
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Basics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote Control
Selenium training
Selenium training
Web Testing
Web Testing
Upcoming new features of selenium in automation testing
Upcoming new features of selenium in automation testing
Selenium
Selenium
Interview Question & Answers for Selenium Freshers | LearningSlot
Interview Question & Answers for Selenium Freshers | LearningSlot
Selenium
Selenium
Selenium ppt
Selenium ppt
A Simple Guide to Selenium Software Testing
A Simple Guide to Selenium Software Testing
Selenium ide made easy
Selenium ide made easy
Selenium interview-questions-freshers
Selenium interview-questions-freshers
What is selenium
What is selenium
Mais de Pragya Rastogi
Gl android platform
Gl android platform
Pragya Rastogi
Qtp questions
Qtp questions
Pragya Rastogi
Qtp not just for gui anymore
Qtp not just for gui anymore
Pragya Rastogi
Qtp tutorial
Qtp tutorial
Pragya Rastogi
Qtp4 bpt
Qtp4 bpt
Pragya Rastogi
Get ro property outputting value
Get ro property outputting value
Pragya Rastogi
Bp ttutorial
Bp ttutorial
Pragya Rastogi
Gl istqb testing fundamentals
Gl istqb testing fundamentals
Pragya Rastogi
Gl scrum testing_models
Gl scrum testing_models
Pragya Rastogi
My Sql concepts
My Sql concepts
Pragya Rastogi
Oops
Oops
Pragya Rastogi
Java programming basics
Java programming basics
Pragya Rastogi
70433 Dumps DB
70433 Dumps DB
Pragya Rastogi
70 433
70 433
Pragya Rastogi
70562-Dumps
70562-Dumps
Pragya Rastogi
70562 (1)
70562 (1)
Pragya Rastogi
32916
32916
Pragya Rastogi
70 562
70 562
Pragya Rastogi
Mobile testingartifacts
Mobile testingartifacts
Pragya Rastogi
Gl qtp day 3 1
Gl qtp day 3 1
Pragya Rastogi
Mais de Pragya Rastogi
(20)
Gl android platform
Gl android platform
Qtp questions
Qtp questions
Qtp not just for gui anymore
Qtp not just for gui anymore
Qtp tutorial
Qtp tutorial
Qtp4 bpt
Qtp4 bpt
Get ro property outputting value
Get ro property outputting value
Bp ttutorial
Bp ttutorial
Gl istqb testing fundamentals
Gl istqb testing fundamentals
Gl scrum testing_models
Gl scrum testing_models
My Sql concepts
My Sql concepts
Oops
Oops
Java programming basics
Java programming basics
70433 Dumps DB
70433 Dumps DB
70 433
70 433
70562-Dumps
70562-Dumps
70562 (1)
70562 (1)
32916
32916
70 562
70 562
Mobile testingartifacts
Mobile testingartifacts
Gl qtp day 3 1
Gl qtp day 3 1
Último
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
Khem
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
apidays
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
apidays
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
apidays
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Roshan Dwivedi
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Juan lago vázquez
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Igalia
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Principled Technologies
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Neo4j
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Khushali Kathiriya
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
wesley chun
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
MIND CTI
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
DianaGray10
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Remote DBA Services
Último
(20)
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
GL_Web application testing using selenium
1.
Connect. Collaborate. Innovate.
Web Application Testing using Selenium Amit Saxena 17/08/2011 © Copyright GlobalLogic 2010 1
2.
Web Application Testing
using Selenium Connect. Collaborate. Innovate. Training Agenda: Selenium Introduction Selenium Components Recording & Testing with Selenium IDE Exercise 1 – Selenium IDE Testing using Selenium RC Exercise 2 – Selenium RC Parallel testing using Selenium Grid © Copyright GlobalLogic 2010 2
3.
Selenium – What
is it? Connect. Collaborate. Innovate. • Selenium is a set of tools to automate web application testing across many platforms. • Selenium runs in many browsers and operating systems. • Selenium can be controlled by many programming languages and testing frameworks. • Selenium is highly flexible. • Selenium is an Open Source project. The code can be modified and enhancements can be submitted for contribution. © Copyright GlobalLogic 2010 3
4.
Selenium Components
Connect. Collaborate. Innovate. Selenium IDE - is a Firefox add-on that records clicks, typing, and other actions to make a test, which you can play back in the browser. Selenium RC - runs your tests in multiple browsers and platforms. Tweak/Customize your tests in your preferred programming language. Selenium Grid - extends Selenium RC to distribute your tests across multiple servers, saving you time by running tests in parallel. © Copyright GlobalLogic 2010 4
5.
Selenium Components…
Connect. Collaborate. Innovate. © Copyright GlobalLogic 2010 5
6.
Platforms Supported by
Selenium Connect. Collaborate. Innovate. © Copyright GlobalLogic 2010 6
7.
Connect. Collaborate. Innovate. Selenium
Commands – Selenese Selenium commands come in three “flavors”: Actions, Accessors and Assertions. Actions are commands that generally manipulate the state of the application. They do things like “click this link” and “select that option”. If an Action fails, or has an error, the execution of the current test is stopped. Accessors examine the state of the application and store the results in variables, e.g. “storeTitle”. They are also used to automatically generate Assertions. Assertions are like Accessors, but they verify that the state of the application conforms to what is expected. Examples include “make sure the page title is X” and “verify that this checkbox is checked”. All Selenium Assertions can be used in 3 modes: Assert – Upon failure test is aborted Verify – Upon failure error is logged and test continues WaitFor – Waits for a conditions for a given timeout © Copyright GlobalLogic 2010 7
8.
Connect. Collaborate. Innovate. Selenium
Scripts Syntax Selenium commands are simple, they consist of the command and two parameters. For example: type id=phone (555) 666-7066 Parameters vary, however they are typically: a locator for identifying a UI element within a page. a text pattern for verifying or asserting expected page content a text pattern or a selenium variable for entering text in an input field or for selecting an option from an option list. © Copyright GlobalLogic 2010 8
9.
Commonly Used Selenium
Commands Connect. Collaborate. Innovate. open opens a page using a URL. click/clickAndWait performs a click operation, and optionally waits for a new page to load. verifyTitle/assertTitle verifies an expected page title. verifyTextPresent verifies expected text is somewhere on the page. verifyElementPresent verifies an expected UI element, as defined by its HTML tag, is present on the page. verifyText verifies expected text and it’s corresponding HTML tag are present on the page. verifyTable verifies a table’s expected contents. waitForPageToLoad pauses execution until an expected new page loads. Called automatically when clickAndWait is used. waitForElementPresent pauses execution until an expected UI element, as defined by its HTML tag, is present on the page. © Copyright GlobalLogic 2010 9
10.
Locating Elements
Connect. Collaborate. Innovate. For many Selenium commands, a target is required. This target identifies an element in the content of the web application, and consists of the location strategy. Some of the location strategies using in Selenium are: Locating by Identifier This is probably the most common method of locating elements and is the catch-all default when no recognized locator type is used. With this strategy, the first element with the id attribute value matching the location will be used. If no element has a matching id attribute, then the first element with a name attribute matching the location will be used. Locating by Id This type of locator is more limited than the identifier locator type, but also more explicit. Use this when you know an element’s id attribute. Locating by Name The name locator type will locate the first element with a matching name attribute. Locating by XPath XPath is the language used for locating nodes in an XML document. As HTML can be an implementation of XML (XHTML), Selenium users can leverage this powerful language to target elements in their web applications. One of the main reasons for using XPath is when you don’t have a suitable id or name attribute for the element you wish to locate. You can use XPath to either locate the element in absolute terms (not advised), or relative to an element that does have an id or name attribute. © Copyright GlobalLogic 2010 10
11.
Selenium IDE
Connect. Collaborate. Innovate. Selenium IDE is an integrated development environment for Selenium scripts. It is implemented as a Firefox extension, and allows you to record, edit, and debug tests. Features: •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, Java, .NET, Php, Perl, Ruby scripts etc. •Support for Selenium user-extensions.js file © Copyright GlobalLogic 2010 11
12.
Selenium IDE Installation
Connect. Collaborate. Innovate. Selenium IDE is installed as a Firefox extension. It can be installed directly within Firefox by going to http://seleniumhq.org/download/ and downloading http://release.seleniumhq.org/selenium-ide/1.0.7/selenium-ide-1.0.7.xpi (XPIs are the Firefox Extensions) © Copyright GlobalLogic 2010 12
13.
Opening Selenium IDE
Connect. Collaborate. Innovate. Selenium IDE is opened from the Tools menu of Firefox. © Copyright GlobalLogic 2010 13
14.
Connect. Collaborate. Innovate. Selenium
IDE Features Menu Bar Toolbar Test Case Pane Test Case Pane Log/Reference Pane © Copyright GlobalLogic 2010 14
15.
Connect. Collaborate. Innovate. Selenium
IDE Basic Toolbar Commands Speed Control: controls how fast your test case runs. Run All: Runs the entire test suite when a test suite with multiple test cases is loaded. Run: Runs the currently selected test. When only a single test is loaded this button and the Run All button have the same effect. Pause/Resume: Allows stopping and re-starting of a running test case. Record: Records the user’s browser actions. Step: Allows you to “step” through a test case by running it one command at a time. Use for debugging test cases. © Copyright GlobalLogic 2010 15
16.
Connect. Collaborate. Innovate. Building
Test Cases using IDE Recording When Selenium-IDE is first opened, the record button is ON by default. 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 listbox - select command • clicking checkboxes or radio buttons - click command Adding Verifications and Asserts With the Context Menu Your test cases will also need to check the properties of a web-page. This requires assert and verify commands. With Selenium-IDE recording, go to the browser displaying your test application and right click anywhere on the page. You will see a context menu showing verify and/or assert commands. Insert Commands in Table View or Source View Commands can also be inserted in the Table view and Source View manually. © Copyright GlobalLogic 2010 16
17.
Exercise 1 –
Selenium IDE Connect. Collaborate. Innovate. 1. Install Selenium IDE 2. Record & Save the following test cases in Selenium IDE: Open Google.com. Search GlobalLogic in Google. Click GlobalLogic link in search result. GlobalLogic homepage should open up. Open GlobalLogic.com. Click About Us. Verify that the About Us page opens up. Open GlobalLogic.com. Click Careers Page. Go to current openings section. Conduct Search. Verify that the search results show up. 3. Execute the above test cases individually in Selenium IDE. 4. Execute the above created test cases as a test suite in Selenium IDE. © Copyright GlobalLogic 2010 17
18.
Selenium RC
Connect. Collaborate. Innovate. Selenium-RC is the solution for tests that need more than simple browser actions and linear execution. Selenium-RC uses the full power of programming languages to create more complex tests like reading and writing files, querying a database, and emailing test results. You’ll want to use Selenium-RC whenever your test requires logic not supported by Selenium-IDE. What logic could this be? For example, Selenium-IDE does not directly support: condition statements iteration logging and reporting of test results error handling, particularly unexpected errors database testing test case grouping re-execution of failed tests test case dependency screenshot capture of test failures © Copyright GlobalLogic 2010 18
19.
Selenium RC Components
Connect. Collaborate. Innovate. Selenium-RC components are: The Selenium Server which launches and kills browsers, interprets and runs the Selenese commands passed from the test program, and acts as an HTTP proxy, intercepting and verifying HTTP messages passed between the browser and the AUT (Application Under Test). Client libraries which provide the interface between each programming language and the Selenium-RC Server. © Copyright GlobalLogic 2010 19
20.
How Selenium RC
Works Connect. Collaborate. Innovate. © Copyright GlobalLogic 2010 20
21.
Installing Selenium RC
Server Connect. Collaborate. Innovate. • The Selenium Server is written in Java, and requires the Java Runtime Environment (JRE) version 1.5.0 or higher in order to start. • Go to the http://seleniumhq.org/download/ and download selenium RC (Latest version is 1.0.3) - http://selenium.googlecode.com/files/selenium-remote-control- 1.0.3.zip • Unzip and extract it any directory. © Copyright GlobalLogic 2010 21
22.
Start the RC
Server Connect. Collaborate. Innovate. • Open command prompt and go to the directory where you have extracted the Selenium RC. • Run the command – java -jar selenium-server.jar © Copyright GlobalLogic 2010 22
23.
Using Java Client
Driver Connect. Collaborate. Innovate. • Extract the file selenium-java-client-driver.jar from selenium-remote-control-1.0.3.zip • Open your desired Java IDE (Eclipse, NetBeans, IntelliJ etc.) • Create a new project. • Add the selenium-java-client-driver.jar files to your project as references. • Add to your project classpath the file selenium-java-client-driver.jar. • From Selenium-IDE, export a script to a Java file and include it in your Java project, or write your Selenium test in Java using the selenium-java-client API. • Run Selenium server from the console. • Execute your test from the Java IDE or from the command-line. © Copyright GlobalLogic 2010 23
24.
Exercise 2 –
Selenium RC Connect. Collaborate. Innovate. 1. Install Selenium RC. 2. Create a Java Project in Eclipse and add JUnit and Selenium Client Driver in project classpath. 3. Export Test Cases From Selenium IDE as JUnits. 4. Export Test Case Suite From Selenium IDE as JUnit Test Suite. 5. Import the Test Cases in Eclipse. 6. Start the Selenium Server. 7. Execute the test cases individually from Eclipse as JUnit. 8. Execute the test cases as a JUnit Suite from Eclipse. © Copyright GlobalLogic 2010 24
25.
Selenium Grid
Connect. Collaborate. Innovate. Selenium-Grid allows the Selenium-RC solution to scale for large test suites or test suites that must be run in multiple environments. With Selenium-Grid, multiple instances of Selenium-RC are running on various operating system and browser configurations; Each of these when launching register with a hub. When tests are sent to the hub they are then redirected to an available Selenium- RC, which will launch the browser and run the test. This allows for running tests in parallel, with the entire test suite theoretically taking only as long to run as the longest individual test. © Copyright GlobalLogic 2010 25
26.
Typical Selenium Grid
Setup Connect. Collaborate. Innovate. © Copyright GlobalLogic 2010 26
27.
Installing Selenium Grid
Connect. Collaborate. Innovate. • Selenium Grid requires the following to be installed: • JDK 1.5 or above • Apache Ant 1.7 or above • Go to the http://selenium-grid.seleniumhq.org/download.html and download Selenium Grid (Latest version is 1.0.8) – http://release.seleniumhq.org/selenium-grid/selenium-grid-1.0.8- bin.zip • Unzip and extract it any directory. © Copyright GlobalLogic 2010 27
28.
Starting Selenium Grid
Connect. Collaborate. Innovate. Selenium Grid requires the Hub and RCs to be started : Hub To start Hub, open command prompt and go to the directory where you have extracted Selenium Grid and type: ant launch-hub RCs To start RCs, open command prompt and go to the directory where you have extracted Selenium Grid and type: ant -Denvironment=“*firefox“ -Dport=5555 launch-remote-control ant -Denvironment=“*iexplore” -Dport=5556 launch-remote-control The above commands would start RCs on ports 5555 and 5556 for firefox and internet explorer environments. When having multiple machines for RCs, following parameters should be used to provide the Hub URL and RC host: ant -Dport=<port> -Dhost=<hostname> -DhubURL=<hub url> launch-remote-control Grid Console Open http://localhost:4444/console to view the registered RCs and their status. © Copyright GlobalLogic 2010 28
29.
Exercise 3 –
Selenium Grid Connect. Collaborate. Innovate. 1. Install Selenium Grid. 2. Start Selenium Grid & RCs. 3. Add Parallel JUnit to the classpath in the Eclipse project. 4. Export Test Case Suite From Selenium IDE as JUnit Suite. 5. Import the Test Case Suite in Eclipse. 6. Execute the Test Case suite using Parallel JUnit from Eclipse. 7. View the available/active RCs in Grid Console. © Copyright GlobalLogic 2010 29
30.
References
Connect. Collaborate. Innovate. Selenium Documentation http://seleniumhq.org/docs/ © Copyright GlobalLogic 2010 30
31.
Questions
Connect. Collaborate. Innovate. ?? © Copyright GlobalLogic 2010 31
32.
Connect. Collaborate. Innovate. Web
Application Testing using Selenium Thank You! © Copyright GlobalLogic 2010 32
Baixar agora