SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Downloaden Sie, um offline zu lesen
Test Automation
with

Selenium
Selenium

Selenium automates browsers.
That's it. What you do with that power is entirely up to
you. Primarily it is for automating web applications for
testing purposes, but is certainly not limited to just that.
Boring web-based administration tasks can (and should!)
also be automated as well.
Selenium has the support of some of the largest browser
vendors who have taken (or are taking) steps to make
Selenium a native part of their browser. It is also the core
technology in countless other browser automation tools,
APIs and frameworks.

Source:
http://www.seleniumhq.org/
Selenium 1.0
Selenium IDE

Selenium IDE is a Firefox plugin
which records and plays back
user interactions with the
browser. Use this to either
create simple scripts or assist in
exploratory testing.

It can also export Remote
Control or WebDriver scripts,
though they tend to be
somewhat brittle and should be
overhauled into some sort of
Page Object-y structure for any
kind of resiliency.

Start and Stop
Recording

Script
Editor

Selenium Log
Selenium 1.0 – Remote Control

Selenium RC was the main Selenium project for a long time, before the WebDriver/Selenium
merge brought up Selenium 2, the newest and more powerful tool.
Selenium 1 is still actively supported (mostly in maintenance mode) and provides some
features that may not be available in Selenium 2 for a while, including support for several
languages (Java, Javascript, Ruby, PHP, Python, Perl and C#) and support for almost every
browser out there.
Selenium 1.0 – Grid

Selenium-Grid allows the Selenium RC
solution to scale for large test suites and
for test suites that must be run in
multiple environments.
Selenium Grid allows you to run your
tests in parallel, that is, different tests
can be run at the same time on different
remote machines.
This additional server piece allows the
several Remote Control servers to
accessed in parallel by one or more
driving processes. You may want to do
this if you want to use scale to speed
everything up, or because you need to
test on Mac and/or Linux, as well as
Windows from one driving test-suite.
Selenium 2.0 – WebDriver

The primary new feature in Selenium 2.0 is the integration of the WebDriver API.
WebDriver is designed to provide a simpler, more concise programming interface in
addition to addressing some limitations in the Selenium-RC API.

Selenium WebDriver was developed to better support dynamic web pages where
elements of a page may change without the page itself being reloaded.
WebDriver’s goal is to supply a well-designed object-oriented API that provides improved
support for modern advanced web-app testing problems.
Selenium 1.0 vs. 2.0

 Selenium WebDriver makes direct calls to the browser using each browser’s native support
for automation.
 For those familiar with Selenium-RC, this is quite different from what you are used to.
Selenium-RC worked the same way for each supported browser. It ‘injected’ javascript
functions into the browser when the browser was loaded and then used its javascript to
drive the AUT within the browser. WebDriver does not use this technique. Again, it drives
the browser directly using the browser’s built in support for automation.
Selenium WebDriver – Development Environment

 IntelliJ, development environment
 JUnit, unit testing framework
 Maven, build tool
IntelliJ

IntelliJ IDEA is a Java IDE by JetBrains, available as an
Apache 2 Licensed community edition and commercial
edition. It is often simply referred to as "IDEA" or
"IntelliJ"
IntelliJ
JUnit
JUnit is a unit testing framework for the Java
programming language. JUnit has been important in the
development of test-driven development, and is one of
a family of unit testing frameworks which is collectively
known as xUnit that originated with SUnit.

JUnit is linked as a JAR at compile-time; the framework resides under package
junit.framework for JUnit 3.8 and earlier, and under package org.junit for JUnit 4
and later.
A JUnit test fixture is a Java object. With older versions of JUnit, fixtures had to
inherit from junit.framework.TestCase, but the new tests using JUnit 4 should not
do this. Test methods must be annotated by the @Test annotation.
JUnit
JUnit

 If you do not use IDE, add a method ‘suite()’, it automatically creates a test suite
including all test methods.

 Then add a main method and use textui runner run all test cases.
Maven
Maven is a build automation tool used primarily for Java projects.
Maven serves a similar purpose to the Apache Ant tool, but it is
based on different concepts and works in a different manner.

Maven uses an XML file to describe the software project being built, its dependencies on
other external modules and components, the build order, directories, and required plugins.

 It comes with pre-defined targets for performing certain well-defined tasks such as
compilation of code and its packaging.
Maven dynamically downloads Java libraries and Maven plug-ins from one or more
repositories such as the Maven 2 Central Repository, and stores them in a local cache.
 This local cache of downloaded artifacts can also be updated with artifacts created
by local projects. Public repositories can also be updated.
.
Maven
Maven projects are configured using a Project Object Model, which is stored in a
pom.xml-file.
This POM only defines a
unique identifier for the
project (coordinates) and its
dependency on the JUnit
framework.
However, that is already
enough for building the project
and running the unit tests
associated with the project.
Maven accomplishes this by
embracing
the idea of
Convention
over
Configuration, that is, Maven
provides default values for the
project's configuration.
Maven

The directory structure of a normal idiomatic Maven
project has the following directory entries:
Selenium Webdriver – Getting Started

How to create a simple Selenium Webdriver test
using

Java, IntelliJ, Junit and Maven
Contact
Bize Ulaşın
info@keytorc.com

blogs.keytorc.com

tr.linkedin.com/in/keytorc

www.twitter.com/Keytorc

Keytorc Software Testing Services

Weitere ähnliche Inhalte

Andere mochten auch

ISTQB / ISEB Foundation Exam Practice
ISTQB / ISEB Foundation Exam PracticeISTQB / ISEB Foundation Exam Practice
ISTQB / ISEB Foundation Exam PracticeYogindernath Gupta
 
KeytorcTestTalks #11 - Serkan Akoğlanoğlu, Release Management vs Test Management
KeytorcTestTalks #11 - Serkan Akoğlanoğlu, Release Management vs Test ManagementKeytorcTestTalks #11 - Serkan Akoğlanoğlu, Release Management vs Test Management
KeytorcTestTalks #11 - Serkan Akoğlanoğlu, Release Management vs Test ManagementKeytorc Software Testing Services
 
Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar
Testistanbul 2016 - Keynote: "The Story of Appium" by Dan CuellarTestistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar
Testistanbul 2016 - Keynote: "The Story of Appium" by Dan CuellarTurkish Testing Board
 
Testistanbul 2016 - Keynote: "Enterprise Challenges of Test Data" by Rex Black
Testistanbul 2016 - Keynote: "Enterprise Challenges of Test Data" by Rex BlackTestistanbul 2016 - Keynote: "Enterprise Challenges of Test Data" by Rex Black
Testistanbul 2016 - Keynote: "Enterprise Challenges of Test Data" by Rex BlackTurkish Testing Board
 
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail Keytorc Software Testing Services
 
EbruKazaskeroglu_CV2016_ENG.PDF
EbruKazaskeroglu_CV2016_ENG.PDFEbruKazaskeroglu_CV2016_ENG.PDF
EbruKazaskeroglu_CV2016_ENG.PDFEbru Kazaskeroglu
 
Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...
Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...
Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...Turkish Testing Board
 
ISTQB / ISEB Foundation Exam Practice -1
ISTQB / ISEB Foundation Exam Practice -1ISTQB / ISEB Foundation Exam Practice -1
ISTQB / ISEB Foundation Exam Practice -1Yogindernath Gupta
 
Istqb ctfl-series - Black Box Testing
Istqb ctfl-series - Black Box TestingIstqb ctfl-series - Black Box Testing
Istqb ctfl-series - Black Box TestingDisha Srivastava
 
Keynote Systems - Mobile Solutions Overview Presentation
Keynote Systems - Mobile Solutions Overview PresentationKeynote Systems - Mobile Solutions Overview Presentation
Keynote Systems - Mobile Solutions Overview Presentationvprathap
 
Testistanbul 2016 - Keynote: "Performance Testing of Big Data" by Roland Leusden
Testistanbul 2016 - Keynote: "Performance Testing of Big Data" by Roland LeusdenTestistanbul 2016 - Keynote: "Performance Testing of Big Data" by Roland Leusden
Testistanbul 2016 - Keynote: "Performance Testing of Big Data" by Roland LeusdenTurkish Testing Board
 
KeytorcTestTalks #11 - Berk Dülger, DevOps Tactical Adaption Theory
KeytorcTestTalks #11 - Berk Dülger, DevOps Tactical Adaption TheoryKeytorcTestTalks #11 - Berk Dülger, DevOps Tactical Adaption Theory
KeytorcTestTalks #11 - Berk Dülger, DevOps Tactical Adaption TheoryKeytorc Software Testing Services
 
ISTQB / ISEB Foundation Exam Practice - 2
ISTQB / ISEB Foundation Exam Practice - 2ISTQB / ISEB Foundation Exam Practice - 2
ISTQB / ISEB Foundation Exam Practice - 2Yogindernath Gupta
 

Andere mochten auch (17)

Web Application Testing
Web Application Testing Web Application Testing
Web Application Testing
 
KeytorcTestTalks #11 - Duygu Onaral, Agile QA'in rolü
KeytorcTestTalks #11 - Duygu Onaral, Agile QA'in rolüKeytorcTestTalks #11 - Duygu Onaral, Agile QA'in rolü
KeytorcTestTalks #11 - Duygu Onaral, Agile QA'in rolü
 
ISTQB / ISEB Foundation Exam Practice
ISTQB / ISEB Foundation Exam PracticeISTQB / ISEB Foundation Exam Practice
ISTQB / ISEB Foundation Exam Practice
 
KeytorcTestTalks #11 - Serkan Akoğlanoğlu, Release Management vs Test Management
KeytorcTestTalks #11 - Serkan Akoğlanoğlu, Release Management vs Test ManagementKeytorcTestTalks #11 - Serkan Akoğlanoğlu, Release Management vs Test Management
KeytorcTestTalks #11 - Serkan Akoğlanoğlu, Release Management vs Test Management
 
Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar
Testistanbul 2016 - Keynote: "The Story of Appium" by Dan CuellarTestistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar
Testistanbul 2016 - Keynote: "The Story of Appium" by Dan Cuellar
 
Testistanbul 2016 - Keynote: "Enterprise Challenges of Test Data" by Rex Black
Testistanbul 2016 - Keynote: "Enterprise Challenges of Test Data" by Rex BlackTestistanbul 2016 - Keynote: "Enterprise Challenges of Test Data" by Rex Black
Testistanbul 2016 - Keynote: "Enterprise Challenges of Test Data" by Rex Black
 
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
KeytorcTestTalks #11 - Onur Başkirt, Agile Test Management with Testrail
 
EbruKazaskeroglu_CV2016_ENG.PDF
EbruKazaskeroglu_CV2016_ENG.PDFEbruKazaskeroglu_CV2016_ENG.PDF
EbruKazaskeroglu_CV2016_ENG.PDF
 
Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...
Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...
Testistanbul 2016 - Keynote: "Why Automated Verification Matters" by Kristian...
 
ISTQB / ISEB Foundation Exam Practice -1
ISTQB / ISEB Foundation Exam Practice -1ISTQB / ISEB Foundation Exam Practice -1
ISTQB / ISEB Foundation Exam Practice -1
 
Istqb ctfl-series - Black Box Testing
Istqb ctfl-series - Black Box TestingIstqb ctfl-series - Black Box Testing
Istqb ctfl-series - Black Box Testing
 
Keytorc Proje Ekibi Zubizu Sunumu - Emirhan Şen
Keytorc Proje Ekibi Zubizu Sunumu - Emirhan ŞenKeytorc Proje Ekibi Zubizu Sunumu - Emirhan Şen
Keytorc Proje Ekibi Zubizu Sunumu - Emirhan Şen
 
Selenium WebDriver
Selenium WebDriverSelenium WebDriver
Selenium WebDriver
 
Keynote Systems - Mobile Solutions Overview Presentation
Keynote Systems - Mobile Solutions Overview PresentationKeynote Systems - Mobile Solutions Overview Presentation
Keynote Systems - Mobile Solutions Overview Presentation
 
Testistanbul 2016 - Keynote: "Performance Testing of Big Data" by Roland Leusden
Testistanbul 2016 - Keynote: "Performance Testing of Big Data" by Roland LeusdenTestistanbul 2016 - Keynote: "Performance Testing of Big Data" by Roland Leusden
Testistanbul 2016 - Keynote: "Performance Testing of Big Data" by Roland Leusden
 
KeytorcTestTalks #11 - Berk Dülger, DevOps Tactical Adaption Theory
KeytorcTestTalks #11 - Berk Dülger, DevOps Tactical Adaption TheoryKeytorcTestTalks #11 - Berk Dülger, DevOps Tactical Adaption Theory
KeytorcTestTalks #11 - Berk Dülger, DevOps Tactical Adaption Theory
 
ISTQB / ISEB Foundation Exam Practice - 2
ISTQB / ISEB Foundation Exam Practice - 2ISTQB / ISEB Foundation Exam Practice - 2
ISTQB / ISEB Foundation Exam Practice - 2
 

Mehr von Keytorc Software Testing Services (11)

Insights Quarterly - Ekim 2017
Insights Quarterly - Ekim 2017Insights Quarterly - Ekim 2017
Insights Quarterly - Ekim 2017
 
Bir Test Uzmanına Söylenmemesi Gereken Şeyler
Bir Test Uzmanına Söylenmemesi Gereken ŞeylerBir Test Uzmanına Söylenmemesi Gereken Şeyler
Bir Test Uzmanına Söylenmemesi Gereken Şeyler
 
Cloud for Agile Testing - Burak Koyuncu
Cloud for Agile Testing - Burak KoyuncuCloud for Agile Testing - Burak Koyuncu
Cloud for Agile Testing - Burak Koyuncu
 
Keytorc Proje Ekibi Zubizu Sunumu - Miray Doğan
Keytorc Proje Ekibi Zubizu Sunumu - Miray DoğanKeytorc Proje Ekibi Zubizu Sunumu - Miray Doğan
Keytorc Proje Ekibi Zubizu Sunumu - Miray Doğan
 
Keytorc Proje Ekibi Zubizu Sunumu - Ozan İlhan
Keytorc Proje Ekibi Zubizu Sunumu - Ozan İlhanKeytorc Proje Ekibi Zubizu Sunumu - Ozan İlhan
Keytorc Proje Ekibi Zubizu Sunumu - Ozan İlhan
 
JMeter Database Performace Testing - Keytorc Approach
JMeter Database Performace Testing - Keytorc ApproachJMeter Database Performace Testing - Keytorc Approach
JMeter Database Performace Testing - Keytorc Approach
 
Version Control CheatSheet - Git
Version Control CheatSheet - GitVersion Control CheatSheet - Git
Version Control CheatSheet - Git
 
Selenium 2- Keytorc Test Automation Cheatsheet
Selenium 2- Keytorc Test Automation CheatsheetSelenium 2- Keytorc Test Automation Cheatsheet
Selenium 2- Keytorc Test Automation Cheatsheet
 
Test Data Management - Keytorc Approach
Test Data Management - Keytorc ApproachTest Data Management - Keytorc Approach
Test Data Management - Keytorc Approach
 
Testing Center of Excellence - Keytorc Approach
Testing Center of Excellence -  Keytorc ApproachTesting Center of Excellence -  Keytorc Approach
Testing Center of Excellence - Keytorc Approach
 
Performance Testing - Keytorc Approach
Performance Testing - Keytorc ApproachPerformance Testing - Keytorc Approach
Performance Testing - Keytorc Approach
 

Kürzlich hochgeladen

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
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, AdobeApidays 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, Adobeapidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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 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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 

Kürzlich hochgeladen (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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, AdobeApidays 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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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 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...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 

Selenium Test Automation - Keytorc Approach

  • 2. Selenium Selenium automates browsers. That's it. What you do with that power is entirely up to you. Primarily it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well. Selenium has the support of some of the largest browser vendors who have taken (or are taking) steps to make Selenium a native part of their browser. It is also the core technology in countless other browser automation tools, APIs and frameworks. Source: http://www.seleniumhq.org/
  • 4. Selenium IDE Selenium IDE is a Firefox plugin which records and plays back user interactions with the browser. Use this to either create simple scripts or assist in exploratory testing. It can also export Remote Control or WebDriver scripts, though they tend to be somewhat brittle and should be overhauled into some sort of Page Object-y structure for any kind of resiliency. Start and Stop Recording Script Editor Selenium Log
  • 5. Selenium 1.0 – Remote Control Selenium RC was the main Selenium project for a long time, before the WebDriver/Selenium merge brought up Selenium 2, the newest and more powerful tool. Selenium 1 is still actively supported (mostly in maintenance mode) and provides some features that may not be available in Selenium 2 for a while, including support for several languages (Java, Javascript, Ruby, PHP, Python, Perl and C#) and support for almost every browser out there.
  • 6. Selenium 1.0 – Grid Selenium-Grid allows the Selenium RC solution to scale for large test suites and for test suites that must be run in multiple environments. Selenium Grid allows you to run your tests in parallel, that is, different tests can be run at the same time on different remote machines. This additional server piece allows the several Remote Control servers to accessed in parallel by one or more driving processes. You may want to do this if you want to use scale to speed everything up, or because you need to test on Mac and/or Linux, as well as Windows from one driving test-suite.
  • 7. Selenium 2.0 – WebDriver The primary new feature in Selenium 2.0 is the integration of the WebDriver API. WebDriver is designed to provide a simpler, more concise programming interface in addition to addressing some limitations in the Selenium-RC API. Selenium WebDriver was developed to better support dynamic web pages where elements of a page may change without the page itself being reloaded. WebDriver’s goal is to supply a well-designed object-oriented API that provides improved support for modern advanced web-app testing problems.
  • 8. Selenium 1.0 vs. 2.0  Selenium WebDriver makes direct calls to the browser using each browser’s native support for automation.  For those familiar with Selenium-RC, this is quite different from what you are used to. Selenium-RC worked the same way for each supported browser. It ‘injected’ javascript functions into the browser when the browser was loaded and then used its javascript to drive the AUT within the browser. WebDriver does not use this technique. Again, it drives the browser directly using the browser’s built in support for automation.
  • 9. Selenium WebDriver – Development Environment  IntelliJ, development environment  JUnit, unit testing framework  Maven, build tool
  • 10. IntelliJ IntelliJ IDEA is a Java IDE by JetBrains, available as an Apache 2 Licensed community edition and commercial edition. It is often simply referred to as "IDEA" or "IntelliJ"
  • 12. JUnit JUnit is a unit testing framework for the Java programming language. JUnit has been important in the development of test-driven development, and is one of a family of unit testing frameworks which is collectively known as xUnit that originated with SUnit. JUnit is linked as a JAR at compile-time; the framework resides under package junit.framework for JUnit 3.8 and earlier, and under package org.junit for JUnit 4 and later. A JUnit test fixture is a Java object. With older versions of JUnit, fixtures had to inherit from junit.framework.TestCase, but the new tests using JUnit 4 should not do this. Test methods must be annotated by the @Test annotation.
  • 13. JUnit
  • 14. JUnit  If you do not use IDE, add a method ‘suite()’, it automatically creates a test suite including all test methods.  Then add a main method and use textui runner run all test cases.
  • 15. Maven Maven is a build automation tool used primarily for Java projects. Maven serves a similar purpose to the Apache Ant tool, but it is based on different concepts and works in a different manner. Maven uses an XML file to describe the software project being built, its dependencies on other external modules and components, the build order, directories, and required plugins.  It comes with pre-defined targets for performing certain well-defined tasks such as compilation of code and its packaging. Maven dynamically downloads Java libraries and Maven plug-ins from one or more repositories such as the Maven 2 Central Repository, and stores them in a local cache.  This local cache of downloaded artifacts can also be updated with artifacts created by local projects. Public repositories can also be updated. .
  • 16. Maven Maven projects are configured using a Project Object Model, which is stored in a pom.xml-file. This POM only defines a unique identifier for the project (coordinates) and its dependency on the JUnit framework. However, that is already enough for building the project and running the unit tests associated with the project. Maven accomplishes this by embracing the idea of Convention over Configuration, that is, Maven provides default values for the project's configuration.
  • 17. Maven The directory structure of a normal idiomatic Maven project has the following directory entries:
  • 18. Selenium Webdriver – Getting Started How to create a simple Selenium Webdriver test using Java, IntelliJ, Junit and Maven