SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
Selenium
‫ﺎ‬َ‫ﻧ‬َ‫ﺗ‬ْ‫ﻣ‬‫ﱠ‬‫ﻠ‬َ‫ﻋ‬ ‫ﺎ‬َ‫ﻣ‬ ‫ﱠ‬‫ﻻ‬ِ‫إ‬ ‫ﺎ‬َ‫ﻧ‬َ‫ﻟ‬ َ‫م‬ْ‫ﻠ‬ِ‫ﻋ‬ َ‫ﻻ‬ َ‫ك‬َ‫ﻧ‬‫ﺎ‬َ‫ﺣ‬ْ‫ﺑ‬ُ‫ﺳ‬َ‫ك‬‫ﱠ‬‫ﻧ‬ِ‫إ‬ُ‫م‬‫ﯾ‬ِ‫ﻛ‬َ‫ﺣ‬ْ‫ﻟ‬‫ا‬ ُ‫م‬‫ﯾ‬ِ‫ﻠ‬َ‫ﻌ‬ْ‫ﻟ‬‫ا‬ َ‫ﻧت‬َ‫أ‬
By: Ahmad Naoum
Why Automated Testing?
Manual Testing Automated Testing
Manual testing requires human
intervention for test execution.
Automation Testing is use of tools to
execute test cases
Manual testing will require skilled
labor, long time & will imply high
costs.
Automation Testing saves time, cost
and manpower. Once recorded, it's
easier to run an automated test suite
Any type of application can be tested
manually, certain testing types like
ad-hoc and monkey testing are more
suited for manual execution.
Automated testing is recommended
only for stable systems and is mostly
used for Regression Testing.
Manual testing can be become
repetitive and boring.
The boring part of executing same
test cases time and again, is handled
by automation software in
Automation Testing.
What is Selenium
• Selenium is a free (open source) automated
testing suite for web applications across
different browsers and platforms.
Selenium Components
• Selenium Integrated Development
Environment (IDE)
• Selenium Remote Control (RC)
• WebDriver
• Selenium Grid
Selenium Components Cont.
Who developed Selenium?
• Selenium was originally developed by Jason
Huggins in 2004
• He named this program as the
"JavaScriptTestRunner.“
• He made JavaScriptRunner open-source which
was later re-named as Selenium Core.
The Same Origin Policy Issue
History of Selenium
• In 2004, Paul Hammant developed Selenium
Remote Control (Selenium RC) to solve the same
origin policy issue. This system became known as
the Selenium Remote Control or Selenium 1.
• In 2008, Philippe Hanrigou made Selenium Grid,
allowing running of multiple Selenium tests
concurrently on any number of local or remote
systems, thus minimizing test execution time.
History of Selenium Cont.
• In 2006, Shinya Kasatani of Japan created
Selenium IDE, a Firefox extension that can
automate the browser through a record-and-
playback feature.
• In 2006, Simon Stewart created WebDriver,
which was the first cross-platform testing
framework that could control the browser from
the OS level.
• In 2008, the whole Selenium Team decided to
merge WebDriver and Selenium RC to form a
more powerful tool called Selenium 2.
Why the Name Selenium?
Important Notes
• Selenium WebDriver is termed as the
successor of Selenium RC which has been
deprecated.
• The Selenium IDE for Firefox stopped working
after the Firefox 55 upgrade and will be no
longer maintained.
Components Summary
• Selenium IDE, a Firefox add-on that you can only use in
creating relatively simple test cases and test suites.
• Selenium Remote Control, also known as Selenium 1,
which is the first Selenium tool that allowed users to use
programming languages in creating complex tests.
• WebDriver, the newer breakthrough that allows your test
scripts to communicate directly to the browser, thereby
controlling it from the OS level.
• Selenium Grid is also a tool that is used with Selenium RC
to execute parallel tests across different browsers and
operating systems.
• Selenium RC and WebDriver was merged to form Selenium
2.
Selenium Components
WebDriver Architecture
Some WebDriver Methods
Method Description
void get(String url) Load a new web page in the current
browser window.
String getTitle() The title of the current page.
WebElement findElement(By by) Find the first WebElement using the
given method.
void close() Close the current window, quitting
the browser if it's the last window
currently open.
void quit() Quits this driver, closing every
associated window.
WebDriver.Navigation navigate() An abstraction allowing the driver to
access the browser's history and to
navigate to a given URL.
Some WebElement Methods
Method Description
void click() Click this element.
void sendKeys(CharSequence...
keysToSend)
The title of the current page.
String getText() Get the visible (i.e. not hidden by
CSS) innerText of this element.
isEnabled() Is the element currently enabled or
not? This will generally return true for
everything but disabled input
elements.
void clear() If this element is a text entry
element, this will clear the value.
Gecko Driver
• This program provides the HTTP API described
by the WebDriver protocol to communicate
with Gecko browsers, such as Firefox.
• Gecko Driver Download
https://github.com/mozilla/geckodriver
Selenium First Project Webpage
Create Project and Add Libraries
1. Install JDK
http://www.oracle.com/technetwork/java/javas
e/downloads/jdk8-downloads-2133151.html
2. Install Eclipse
https://www.eclipse.org/downloads/
3. Create a Java Project in Eclipse
4. Add Selenium jars
https://www.seleniumhq.org/download/
5. Add Gecko Driver
Project Implementation Steps
1. Create Project and Add Libraries
2. Launching a Browser Session
3. Read Test Cases From File
4. Run Test Case
5. Validate Output
6. Save Testing Results in File
References
• SeleniumHQ
https://www.seleniumhq.org/
• Selenium WebDriver Java API Docs
https://seleniumhq.github.io/selenium/docs/api/java/
• GURU99 Selenium Tutorial
https://www.guru99.com/selenium-tutorial.html
• GURU99 Manual testing Tutorial
https://www.guru99.com/manual-testing.html
• Wikipedia
https://en.wikipedia.org/wiki/Selenium_%28software
%29
Any Questions

Weitere ähnliche Inhalte

Was ist angesagt?

Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Simplilearn
 
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Simplilearn
 

Was ist angesagt? (20)

Selenium
SeleniumSelenium
Selenium
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
 
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
 
QSpiders - Automation using Selenium
QSpiders - Automation using SeleniumQSpiders - Automation using Selenium
QSpiders - Automation using Selenium
 
Test Automation and Selenium
Test Automation and SeleniumTest Automation and Selenium
Test Automation and Selenium
 
Selenium test automation
Selenium test automationSelenium test automation
Selenium test automation
 
Selenium Maven With Eclipse | Edureka
Selenium Maven With Eclipse | EdurekaSelenium Maven With Eclipse | Edureka
Selenium Maven With Eclipse | Edureka
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
 
Selenium Primer
Selenium PrimerSelenium Primer
Selenium Primer
 
Automation Testing by Selenium Web Driver
Automation Testing by Selenium Web DriverAutomation Testing by Selenium Web Driver
Automation Testing by Selenium Web Driver
 
Automated Web Testing Using Selenium
Automated Web Testing Using SeleniumAutomated Web Testing Using Selenium
Automated Web Testing Using Selenium
 
Selenium Concepts
Selenium ConceptsSelenium Concepts
Selenium Concepts
 
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
 
Selenium- A Software Testing Tool
Selenium- A Software Testing ToolSelenium- A Software Testing Tool
Selenium- A Software Testing Tool
 
Selenium WebDriver
Selenium WebDriverSelenium WebDriver
Selenium WebDriver
 
Selenium
SeleniumSelenium
Selenium
 
Test automation using selenium
Test automation using seleniumTest automation using selenium
Test automation using selenium
 
SELENIUM PPT.pdf
SELENIUM PPT.pdfSELENIUM PPT.pdf
SELENIUM PPT.pdf
 
Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium
 

Ähnlich wie Selenium - Introduction

Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
Nikhil Kapoor
 

Ähnlich wie Selenium - Introduction (20)

Selenium
SeleniumSelenium
Selenium
 
Selenium.pptx
Selenium.pptxSelenium.pptx
Selenium.pptx
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium presentation
Selenium presentationSelenium presentation
Selenium presentation
 
selenium-webdriver-interview-questions.pdf
selenium-webdriver-interview-questions.pdfselenium-webdriver-interview-questions.pdf
selenium-webdriver-interview-questions.pdf
 
What is Selenium Introduction to Selenium Testing.pptx
What is Selenium Introduction to Selenium Testing.pptxWhat is Selenium Introduction to Selenium Testing.pptx
What is Selenium Introduction to Selenium Testing.pptx
 
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
 
Selenium (1) (1)
Selenium (1) (1)Selenium (1) (1)
Selenium (1) (1)
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Automation Testing using Selenium Webdriver
Automation Testing using Selenium WebdriverAutomation Testing using Selenium Webdriver
Automation Testing using Selenium Webdriver
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium Successfully
 
Selenium using Java
Selenium using JavaSelenium using Java
Selenium using Java
 
Selenium
SeleniumSelenium
Selenium
 
Lesson_06_Software_and_Automation_Testing_Frameworks.pdf
Lesson_06_Software_and_Automation_Testing_Frameworks.pdfLesson_06_Software_and_Automation_Testing_Frameworks.pdf
Lesson_06_Software_and_Automation_Testing_Frameworks.pdf
 
Selenium training
Selenium trainingSelenium training
Selenium training
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 

Mehr von Amr E. Mohamed

Mehr von Amr E. Mohamed (20)

Dsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processingDsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processing
 
Dcs lec03 - z-analysis of discrete time control systems
Dcs   lec03 - z-analysis of discrete time control systemsDcs   lec03 - z-analysis of discrete time control systems
Dcs lec03 - z-analysis of discrete time control systems
 
Dcs lec02 - z-transform
Dcs   lec02 - z-transformDcs   lec02 - z-transform
Dcs lec02 - z-transform
 
Dcs lec01 - introduction to discrete-time control systems
Dcs   lec01 - introduction to discrete-time control systemsDcs   lec01 - introduction to discrete-time control systems
Dcs lec01 - introduction to discrete-time control systems
 
DDSP_2018_FOEHU - Lec 10 - Digital Signal Processing Applications
DDSP_2018_FOEHU - Lec 10 - Digital Signal Processing ApplicationsDDSP_2018_FOEHU - Lec 10 - Digital Signal Processing Applications
DDSP_2018_FOEHU - Lec 10 - Digital Signal Processing Applications
 
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter DesignDSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
 
DSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter DesignDSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter Design
 
SE2018_Lec 17_ Coding
SE2018_Lec 17_ CodingSE2018_Lec 17_ Coding
SE2018_Lec 17_ Coding
 
SE2018_Lec-22_-Continuous-Integration-Tools
SE2018_Lec-22_-Continuous-Integration-ToolsSE2018_Lec-22_-Continuous-Integration-Tools
SE2018_Lec-22_-Continuous-Integration-Tools
 
SE2018_Lec 21_ Software Configuration Management (SCM)
SE2018_Lec 21_ Software Configuration Management (SCM)SE2018_Lec 21_ Software Configuration Management (SCM)
SE2018_Lec 21_ Software Configuration Management (SCM)
 
SE2018_Lec 18_ Design Principles and Design Patterns
SE2018_Lec 18_ Design Principles and Design PatternsSE2018_Lec 18_ Design Principles and Design Patterns
SE2018_Lec 18_ Design Principles and Design Patterns
 
SE2018_Lec 20_ Test-Driven Development (TDD)
SE2018_Lec 20_ Test-Driven Development (TDD)SE2018_Lec 20_ Test-Driven Development (TDD)
SE2018_Lec 20_ Test-Driven Development (TDD)
 
SE2018_Lec 19_ Software Testing
SE2018_Lec 19_ Software TestingSE2018_Lec 19_ Software Testing
SE2018_Lec 19_ Software Testing
 
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
 
DSP_2018_FOEHU - Lec 05 - Digital Filters
DSP_2018_FOEHU - Lec 05 - Digital FiltersDSP_2018_FOEHU - Lec 05 - Digital Filters
DSP_2018_FOEHU - Lec 05 - Digital Filters
 
DSP_2018_FOEHU - Lec 04 - The z-Transform
DSP_2018_FOEHU - Lec 04 - The z-TransformDSP_2018_FOEHU - Lec 04 - The z-Transform
DSP_2018_FOEHU - Lec 04 - The z-Transform
 
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and SystemsDSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
 
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time SignalsDSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
DSP_2018_FOEHU - Lec 02 - Sampling of Continuous Time Signals
 
SE2018_Lec 15_ Software Design
SE2018_Lec 15_ Software DesignSE2018_Lec 15_ Software Design
SE2018_Lec 15_ Software Design
 
DSP_2018_FOEHU - Lec 1 - Introduction to Digital Signal Processing
DSP_2018_FOEHU - Lec 1 - Introduction to Digital Signal ProcessingDSP_2018_FOEHU - Lec 1 - Introduction to Digital Signal Processing
DSP_2018_FOEHU - Lec 1 - Introduction to Digital Signal Processing
 

Kürzlich hochgeladen

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 

Kürzlich hochgeladen (20)

NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 

Selenium - Introduction

  • 1. Selenium ‫ﺎ‬َ‫ﻧ‬َ‫ﺗ‬ْ‫ﻣ‬‫ﱠ‬‫ﻠ‬َ‫ﻋ‬ ‫ﺎ‬َ‫ﻣ‬ ‫ﱠ‬‫ﻻ‬ِ‫إ‬ ‫ﺎ‬َ‫ﻧ‬َ‫ﻟ‬ َ‫م‬ْ‫ﻠ‬ِ‫ﻋ‬ َ‫ﻻ‬ َ‫ك‬َ‫ﻧ‬‫ﺎ‬َ‫ﺣ‬ْ‫ﺑ‬ُ‫ﺳ‬َ‫ك‬‫ﱠ‬‫ﻧ‬ِ‫إ‬ُ‫م‬‫ﯾ‬ِ‫ﻛ‬َ‫ﺣ‬ْ‫ﻟ‬‫ا‬ ُ‫م‬‫ﯾ‬ِ‫ﻠ‬َ‫ﻌ‬ْ‫ﻟ‬‫ا‬ َ‫ﻧت‬َ‫أ‬ By: Ahmad Naoum
  • 2. Why Automated Testing? Manual Testing Automated Testing Manual testing requires human intervention for test execution. Automation Testing is use of tools to execute test cases Manual testing will require skilled labor, long time & will imply high costs. Automation Testing saves time, cost and manpower. Once recorded, it's easier to run an automated test suite Any type of application can be tested manually, certain testing types like ad-hoc and monkey testing are more suited for manual execution. Automated testing is recommended only for stable systems and is mostly used for Regression Testing. Manual testing can be become repetitive and boring. The boring part of executing same test cases time and again, is handled by automation software in Automation Testing.
  • 3. What is Selenium • Selenium is a free (open source) automated testing suite for web applications across different browsers and platforms.
  • 4. Selenium Components • Selenium Integrated Development Environment (IDE) • Selenium Remote Control (RC) • WebDriver • Selenium Grid
  • 6. Who developed Selenium? • Selenium was originally developed by Jason Huggins in 2004 • He named this program as the "JavaScriptTestRunner.“ • He made JavaScriptRunner open-source which was later re-named as Selenium Core.
  • 7. The Same Origin Policy Issue
  • 8. History of Selenium • In 2004, Paul Hammant developed Selenium Remote Control (Selenium RC) to solve the same origin policy issue. This system became known as the Selenium Remote Control or Selenium 1. • In 2008, Philippe Hanrigou made Selenium Grid, allowing running of multiple Selenium tests concurrently on any number of local or remote systems, thus minimizing test execution time.
  • 9. History of Selenium Cont. • In 2006, Shinya Kasatani of Japan created Selenium IDE, a Firefox extension that can automate the browser through a record-and- playback feature. • In 2006, Simon Stewart created WebDriver, which was the first cross-platform testing framework that could control the browser from the OS level. • In 2008, the whole Selenium Team decided to merge WebDriver and Selenium RC to form a more powerful tool called Selenium 2.
  • 10. Why the Name Selenium?
  • 11. Important Notes • Selenium WebDriver is termed as the successor of Selenium RC which has been deprecated. • The Selenium IDE for Firefox stopped working after the Firefox 55 upgrade and will be no longer maintained.
  • 12. Components Summary • Selenium IDE, a Firefox add-on that you can only use in creating relatively simple test cases and test suites. • Selenium Remote Control, also known as Selenium 1, which is the first Selenium tool that allowed users to use programming languages in creating complex tests. • WebDriver, the newer breakthrough that allows your test scripts to communicate directly to the browser, thereby controlling it from the OS level. • Selenium Grid is also a tool that is used with Selenium RC to execute parallel tests across different browsers and operating systems. • Selenium RC and WebDriver was merged to form Selenium 2.
  • 15. Some WebDriver Methods Method Description void get(String url) Load a new web page in the current browser window. String getTitle() The title of the current page. WebElement findElement(By by) Find the first WebElement using the given method. void close() Close the current window, quitting the browser if it's the last window currently open. void quit() Quits this driver, closing every associated window. WebDriver.Navigation navigate() An abstraction allowing the driver to access the browser's history and to navigate to a given URL.
  • 16. Some WebElement Methods Method Description void click() Click this element. void sendKeys(CharSequence... keysToSend) The title of the current page. String getText() Get the visible (i.e. not hidden by CSS) innerText of this element. isEnabled() Is the element currently enabled or not? This will generally return true for everything but disabled input elements. void clear() If this element is a text entry element, this will clear the value.
  • 17. Gecko Driver • This program provides the HTTP API described by the WebDriver protocol to communicate with Gecko browsers, such as Firefox. • Gecko Driver Download https://github.com/mozilla/geckodriver
  • 19. Create Project and Add Libraries 1. Install JDK http://www.oracle.com/technetwork/java/javas e/downloads/jdk8-downloads-2133151.html 2. Install Eclipse https://www.eclipse.org/downloads/ 3. Create a Java Project in Eclipse 4. Add Selenium jars https://www.seleniumhq.org/download/ 5. Add Gecko Driver
  • 20. Project Implementation Steps 1. Create Project and Add Libraries 2. Launching a Browser Session 3. Read Test Cases From File 4. Run Test Case 5. Validate Output 6. Save Testing Results in File
  • 21. References • SeleniumHQ https://www.seleniumhq.org/ • Selenium WebDriver Java API Docs https://seleniumhq.github.io/selenium/docs/api/java/ • GURU99 Selenium Tutorial https://www.guru99.com/selenium-tutorial.html • GURU99 Manual testing Tutorial https://www.guru99.com/manual-testing.html • Wikipedia https://en.wikipedia.org/wiki/Selenium_%28software %29