SlideShare a Scribd company logo
Trivia:
Selenium has a strong bonding affinity with mercury and arsenic, so if you eat
fish, it’s a good idea to choose types of fish high in selenium.
But although it’s a necessary nutrient, more than a trace amount of it will have
you pushing up daisies in a heartbeat.
(Or lack thereof.)
The name for the Selenium, the browser automation tool, comes from a joke
made by founders in an email, mocking their competitor “Mercury” – since
selenium is a cure for mercury poisoning. The rest of the devs took it and ran
with it.
What’s Selenium?
Selenium automates browsers for testing purposes, and also can be
used for automating mind-numbing, soul-crushing tasks (like searching
for “new” users in PUMA and changing their status to “active”).
The primary products are Selenium IDE, Selenium WebDriver (aka
Selenium 2), and Selenium Server.
Examples/info based on using Java w/Eclipse ( v. Kepler has Maven
integrated – Maven will import all necessary Se dependencies), Firebug
(cool inspection tool), Firepath
Selenium Server needs to be used for:
• Distributing tests over multiple machines or VMs at once
• Connecting to a remote machine that has a browser version that’s not
on your specific machine
• Instructions for Java at
http://code.google.com/p/selenium/wiki/Grid2
Selenium IDE
• Runs as a Firefox add-on and can
record, edit, play, and debug tests.
• Can record user actions or be edited by hand, then played back as browser
emulation. It’s as though a ghost were using your computer! Aaaagh!!!
• It can be experimentally exported in several code languages
• Brilliant if you need to script a ton of crap, super fast (see February VA
move)
• Creates a good, lightning-fast base for any automated, which can then be
coded as necessary
• It’s a nice introduction to Selenese, Selenium’s set of commands
Record-><- Play
Run results displayed here
Selenium IDE limitations
• No conditional or looping statements
• Limited to Firefox out of the box
• Formatted reporting not supported
• Uses html language – exporting in others is currently ‘experimental’ –
tends to import defunct dependencies and other extraneous crap
• Can’t read from external databases or files
Selenium Webdriver (aka Se 2)
• It’s a collection of bindings which drives browsers natively as a user
would, either locally or remotely with Selenium Server
• It makes direct calls to a browser using the browser’s native support
for automation
• Can be used in Java (recommended), C#, Perl, PHP, Python, and Ruby
• Has WebDrivers for IE, Chrome, Firefox, Safari, IOS, Android and
Opera. Chrome and IE require a separate server download.
Webdriver has a few limitations…
• Like everything else, has a few bugs
• It’s Open Source – tech problems need
to be resolved through Se community,
and you’re on your own to learn it
• Can only automate web applications
• No inbuilt reporting capabilities
• IE, and to a lesser extent, Chrome, can
be buggy (recall that it uses a browsers
native support for automation…..)
What can Webdriver do?
• Finding, retrieving, and verifying/asserting web elements by
Name, ID, TagName, Class, LinkText, PartialLinkText, Xpath, and CSS
• Mouse-based interactions including mouse position by absolute (using x,y)
or relative, clicking at current or specified locations or elements, click and
hold, release, drag and drop, double click, right click
• Keyboard interactions: Typing text, multiple keys (such as Ctrl +
PrntScrn), key up/down
• Taking screenshots, accepting security alerts, locating/switching between
windows, executing custom Javascript, enabling browsers to interact with
window alerts, navigating back/forward, implicit/explicit
waits, downloading/copying files, permissioning files to be executable and
much more both universal and specific to individual browsers
Success!
Generic success output –
everything works as
expected. Success and
fail reports can be coded
with as much or little
detail as you like by
conditional output to the
console.
Example of failed test;
element “Agout” not found.
Problematic line on
failure trace, below –
Assertion Error.
Selenium website – seleniumhq.org
The website will tell you where to download
and how to set it up (but not how
to use it).
Helpful book on Selenium for developers
using java:
“Selenium Webdriver Practical Guide”
by Satya Avasarala
If you’d like to use Selenium, make sure you don’t seek out any info
before about 6 months ago. It always changes fast, but in the last few
months has undergone huge changes. Search on “Selenium
Webdriver”.

More Related Content

What's hot (9)

Selenium Best Practices with Jason Huggins
Selenium Best Practices with Jason HugginsSelenium Best Practices with Jason Huggins
Selenium Best Practices with Jason Huggins
Sauce Labs
 
How to Use Selenium, Successfully
How to Use Selenium, SuccessfullyHow to Use Selenium, Successfully
How to Use Selenium, Successfully
Sauce Labs
 
Selenium -Test automation for web applications
Selenium -Test automation for web applicationsSelenium -Test automation for web applications
Selenium -Test automation for web applications
AnisGhelissi
 
Let's make this test suite run faster
Let's make this test suite run fasterLet's make this test suite run faster
Let's make this test suite run faster
David Gageot
 
Introduction To Appium With Robotframework
Introduction To Appium With RobotframeworkIntroduction To Appium With Robotframework
Introduction To Appium With Robotframework
Syam Sasi
 
The Future of Selenium Testing for Mobile Web and Native Apps
The Future of Selenium Testing for Mobile Web and Native AppsThe Future of Selenium Testing for Mobile Web and Native Apps
The Future of Selenium Testing for Mobile Web and Native Apps
Sauce Labs
 
How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.
DrupalCampDN
 
Open Source Automation Tools That Really Work V2
Open Source Automation Tools That Really Work V2Open Source Automation Tools That Really Work V2
Open Source Automation Tools That Really Work V2
An Doan
 
Netbeans dev and ecosystem
Netbeans dev and ecosystemNetbeans dev and ecosystem
Netbeans dev and ecosystem
Peter Cheung
 
Selenium Best Practices with Jason Huggins
Selenium Best Practices with Jason HugginsSelenium Best Practices with Jason Huggins
Selenium Best Practices with Jason Huggins
Sauce Labs
 
How to Use Selenium, Successfully
How to Use Selenium, SuccessfullyHow to Use Selenium, Successfully
How to Use Selenium, Successfully
Sauce Labs
 
Selenium -Test automation for web applications
Selenium -Test automation for web applicationsSelenium -Test automation for web applications
Selenium -Test automation for web applications
AnisGhelissi
 
Let's make this test suite run faster
Let's make this test suite run fasterLet's make this test suite run faster
Let's make this test suite run faster
David Gageot
 
Introduction To Appium With Robotframework
Introduction To Appium With RobotframeworkIntroduction To Appium With Robotframework
Introduction To Appium With Robotframework
Syam Sasi
 
The Future of Selenium Testing for Mobile Web and Native Apps
The Future of Selenium Testing for Mobile Web and Native AppsThe Future of Selenium Testing for Mobile Web and Native Apps
The Future of Selenium Testing for Mobile Web and Native Apps
Sauce Labs
 
How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.
DrupalCampDN
 
Open Source Automation Tools That Really Work V2
Open Source Automation Tools That Really Work V2Open Source Automation Tools That Really Work V2
Open Source Automation Tools That Really Work V2
An Doan
 
Netbeans dev and ecosystem
Netbeans dev and ecosystemNetbeans dev and ecosystem
Netbeans dev and ecosystem
Peter Cheung
 

Viewers also liked (20)

lightening talk
lightening talklightening talk
lightening talk
Christopher Grandoit
 
Lc 213 mélanges et solutions
Lc 213  mélanges et solutions Lc 213  mélanges et solutions
Lc 213 mélanges et solutions
Lapitievivi02
 
Heat
HeatHeat
Heat
140176
 
Reason For Hiring Lavish Limousine Services
 Reason For Hiring Lavish Limousine  Services Reason For Hiring Lavish Limousine  Services
Reason For Hiring Lavish Limousine Services
Vince Zogovich
 
5 reasons to join baxplore
5 reasons to join baxplore5 reasons to join baxplore
5 reasons to join baxplore
Rosamund Lim
 
Heat
HeatHeat
Heat
140176
 
5 reasons to join BAxplore
5 reasons to join BAxplore5 reasons to join BAxplore
5 reasons to join BAxplore
Rosamund Lim
 
Almost same Kanji character 08
Almost same Kanji character 08Almost same Kanji character 08
Almost same Kanji character 08
Adel Sakura
 
Almost same Kanji character 02
Almost same Kanji character 02Almost same Kanji character 02
Almost same Kanji character 02
Adel Sakura
 
Mercury justin
Mercury justinMercury justin
Mercury justin
juco00207
 
Almost same Kanji character 05
Almost same Kanji character 05Almost same Kanji character 05
Almost same Kanji character 05
Adel Sakura
 
Introduction to Psalms
Introduction to PsalmsIntroduction to Psalms
Introduction to Psalms
williamsdk1
 
Malay, Japanese, English
Malay, Japanese, EnglishMalay, Japanese, English
Malay, Japanese, English
Adel Sakura
 
Almost same Kanji character 25
Almost same Kanji character 25Almost same Kanji character 25
Almost same Kanji character 25
Adel Sakura
 
1000 kanjis japanese dictionary
1000 kanjis japanese dictionary1000 kanjis japanese dictionary
1000 kanjis japanese dictionary
Adel Sakura
 
Premium-Finance Whole Life Insurance
Premium-Finance Whole Life InsurancePremium-Finance Whole Life Insurance
Premium-Finance Whole Life Insurance
dosh1965
 
Selenium and Cucumber Automation Services
Selenium and Cucumber Automation ServicesSelenium and Cucumber Automation Services
Selenium and Cucumber Automation Services
LMS Solutions (India) Pvt.Ltd.
 
Automation with Selenium Presented by Quontra Solutions
Automation with Selenium Presented by Quontra SolutionsAutomation with Selenium Presented by Quontra Solutions
Automation with Selenium Presented by Quontra Solutions
Quontra Solutions
 
Selenium as a trend
Selenium as a trendSelenium as a trend
Selenium as a trend
Nataliya Holodiuk
 
Alliance Successful Selenium Automation
Alliance Successful Selenium AutomationAlliance Successful Selenium Automation
Alliance Successful Selenium Automation
sadams22
 
Lc 213 mélanges et solutions
Lc 213  mélanges et solutions Lc 213  mélanges et solutions
Lc 213 mélanges et solutions
Lapitievivi02
 
Reason For Hiring Lavish Limousine Services
 Reason For Hiring Lavish Limousine  Services Reason For Hiring Lavish Limousine  Services
Reason For Hiring Lavish Limousine Services
Vince Zogovich
 
5 reasons to join baxplore
5 reasons to join baxplore5 reasons to join baxplore
5 reasons to join baxplore
Rosamund Lim
 
5 reasons to join BAxplore
5 reasons to join BAxplore5 reasons to join BAxplore
5 reasons to join BAxplore
Rosamund Lim
 
Almost same Kanji character 08
Almost same Kanji character 08Almost same Kanji character 08
Almost same Kanji character 08
Adel Sakura
 
Almost same Kanji character 02
Almost same Kanji character 02Almost same Kanji character 02
Almost same Kanji character 02
Adel Sakura
 
Mercury justin
Mercury justinMercury justin
Mercury justin
juco00207
 
Almost same Kanji character 05
Almost same Kanji character 05Almost same Kanji character 05
Almost same Kanji character 05
Adel Sakura
 
Introduction to Psalms
Introduction to PsalmsIntroduction to Psalms
Introduction to Psalms
williamsdk1
 
Malay, Japanese, English
Malay, Japanese, EnglishMalay, Japanese, English
Malay, Japanese, English
Adel Sakura
 
Almost same Kanji character 25
Almost same Kanji character 25Almost same Kanji character 25
Almost same Kanji character 25
Adel Sakura
 
1000 kanjis japanese dictionary
1000 kanjis japanese dictionary1000 kanjis japanese dictionary
1000 kanjis japanese dictionary
Adel Sakura
 
Premium-Finance Whole Life Insurance
Premium-Finance Whole Life InsurancePremium-Finance Whole Life Insurance
Premium-Finance Whole Life Insurance
dosh1965
 
Automation with Selenium Presented by Quontra Solutions
Automation with Selenium Presented by Quontra SolutionsAutomation with Selenium Presented by Quontra Solutions
Automation with Selenium Presented by Quontra Solutions
Quontra Solutions
 
Alliance Successful Selenium Automation
Alliance Successful Selenium AutomationAlliance Successful Selenium Automation
Alliance Successful Selenium Automation
sadams22
 
Ad

Similar to Automation With Selenium (20)

Selenium Automation
Selenium AutomationSelenium Automation
Selenium Automation
Anuradha Malalasena
 
Selenium web driver
Selenium web driverSelenium web driver
Selenium web driver
Roman Savitskiy
 
BCS Selenium Workshop
BCS Selenium WorkshopBCS Selenium Workshop
BCS Selenium Workshop
Colin McDonald
 
Selenium
SeleniumSelenium
Selenium
Kalyan ch
 
Selenium
SeleniumSelenium
Selenium
Daksh Sharma
 
Selenium Basics and Overview topics.pptx
Selenium Basics and Overview topics.pptxSelenium Basics and Overview topics.pptx
Selenium Basics and Overview topics.pptx
sountharyaravi010
 
Selenium Basics and Overview1233444.pptx
Selenium Basics and Overview1233444.pptxSelenium Basics and Overview1233444.pptx
Selenium Basics and Overview1233444.pptx
sountharyaravi010
 
Selenium introduction
Selenium introductionSelenium introduction
Selenium introduction
Pankaj Dubey
 
Selenium Tutorial
Selenium TutorialSelenium Tutorial
Selenium Tutorial
prad_123
 
Selenium
SeleniumSelenium
Selenium
jagdishdevabhaipatel
 
Sel
SelSel
Sel
Sandeep A R
 
QSpiders - Automation using Selenium
QSpiders - Automation using SeleniumQSpiders - Automation using Selenium
QSpiders - Automation using Selenium
Qspiders - Software Testing Training Institute
 
Selenium presentation
Selenium presentationSelenium presentation
Selenium presentation
shivani thakur
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
Nikhil Kapoor
 
Selenium Concepts
Selenium ConceptsSelenium Concepts
Selenium Concepts
Swati Bansal
 
Selenium by using JAVA
Selenium by using JAVASelenium by using JAVA
Selenium by using JAVA
mahirayavarapu
 
Selenium Basics by Quontra Solutions
Selenium Basics by Quontra SolutionsSelenium Basics by Quontra Solutions
Selenium Basics by Quontra Solutions
QUONTRASOLUTIONS
 
Python selenium
Python seleniumPython selenium
Python selenium
Ducat
 
Selenium
SeleniumSelenium
Selenium
eduquer
 
Selenium Automation Using Ruby
Selenium Automation Using RubySelenium Automation Using Ruby
Selenium Automation Using Ruby
Kumari Warsha Goel
 
Ad

Recently uploaded (20)

MEDIA_LITERACY_INDEX_OF_EDUCATORS_ENG.pdf
MEDIA_LITERACY_INDEX_OF_EDUCATORS_ENG.pdfMEDIA_LITERACY_INDEX_OF_EDUCATORS_ENG.pdf
MEDIA_LITERACY_INDEX_OF_EDUCATORS_ENG.pdf
OlhaTatokhina1
 
Chronic constipation presentaion final.ppt
Chronic constipation presentaion final.pptChronic constipation presentaion final.ppt
Chronic constipation presentaion final.ppt
DrShashank7
 
apidays New York 2025 - Computers are still dumb by Ben Morss (DeepL)
apidays New York 2025 - Computers are still dumb by Ben Morss (DeepL)apidays New York 2025 - Computers are still dumb by Ben Morss (DeepL)
apidays New York 2025 - Computers are still dumb by Ben Morss (DeepL)
apidays
 
Alcoholic liver disease slides presentation new.pptx
Alcoholic liver disease slides presentation new.pptxAlcoholic liver disease slides presentation new.pptx
Alcoholic liver disease slides presentation new.pptx
DrShashank7
 
apidays New York 2025 - Unifying OpenAPI & AsyncAPI by Naresh Jain & Hari Kri...
apidays New York 2025 - Unifying OpenAPI & AsyncAPI by Naresh Jain & Hari Kri...apidays New York 2025 - Unifying OpenAPI & AsyncAPI by Naresh Jain & Hari Kri...
apidays New York 2025 - Unifying OpenAPI & AsyncAPI by Naresh Jain & Hari Kri...
apidays
 
Math arihant handbook.pdf all formula is here
Math arihant handbook.pdf all formula is hereMath arihant handbook.pdf all formula is here
Math arihant handbook.pdf all formula is here
rdarshankumar84
 
apidays New York 2025 - Open Source and disrupting the travel distribution ec...
apidays New York 2025 - Open Source and disrupting the travel distribution ec...apidays New York 2025 - Open Source and disrupting the travel distribution ec...
apidays New York 2025 - Open Source and disrupting the travel distribution ec...
apidays
 
1022_ExtendEnrichExcelUsingPythonWithTableau_04_16+04_17 (1).pdf
1022_ExtendEnrichExcelUsingPythonWithTableau_04_16+04_17 (1).pdf1022_ExtendEnrichExcelUsingPythonWithTableau_04_16+04_17 (1).pdf
1022_ExtendEnrichExcelUsingPythonWithTableau_04_16+04_17 (1).pdf
elinavihriala
 
apidays New York 2025 - Building Scalable AI Systems by Sai Prasad Veluru (Ap...
apidays New York 2025 - Building Scalable AI Systems by Sai Prasad Veluru (Ap...apidays New York 2025 - Building Scalable AI Systems by Sai Prasad Veluru (Ap...
apidays New York 2025 - Building Scalable AI Systems by Sai Prasad Veluru (Ap...
apidays
 
PSUG 7 - 2025-06-03 - David Bianco on Splunk SURGe
PSUG 7 - 2025-06-03 - David Bianco on Splunk SURGePSUG 7 - 2025-06-03 - David Bianco on Splunk SURGe
PSUG 7 - 2025-06-03 - David Bianco on Splunk SURGe
Tomas Moser
 
Philippine-Constitution-and-Law in hospitality
Philippine-Constitution-and-Law in hospitalityPhilippine-Constitution-and-Law in hospitality
Philippine-Constitution-and-Law in hospitality
kikomendoza006
 
apidays New York 2025 - Why an SDK is Needed to Protect APIs from Mobile Apps...
apidays New York 2025 - Why an SDK is Needed to Protect APIs from Mobile Apps...apidays New York 2025 - Why an SDK is Needed to Protect APIs from Mobile Apps...
apidays New York 2025 - Why an SDK is Needed to Protect APIs from Mobile Apps...
apidays
 
Ch01_Introduction_to_Information_Securit
Ch01_Introduction_to_Information_SecuritCh01_Introduction_to_Information_Securit
Ch01_Introduction_to_Information_Securit
KawukiDerrick
 
Media_Literacy_Index_of_Media_Sector_Employees.pdf
Media_Literacy_Index_of_Media_Sector_Employees.pdfMedia_Literacy_Index_of_Media_Sector_Employees.pdf
Media_Literacy_Index_of_Media_Sector_Employees.pdf
OlhaTatokhina1
 
Али махмуд to The teacm of ghsbh to fortune .pptx
Али махмуд to The teacm of ghsbh to fortune .pptxАли махмуд to The teacm of ghsbh to fortune .pptx
Али махмуд to The teacm of ghsbh to fortune .pptx
palr19411
 
Arrays in c programing. practicals and .ppt
Arrays in c programing. practicals and .pptArrays in c programing. practicals and .ppt
Arrays in c programing. practicals and .ppt
Carlos701746
 
apidays New York 2025 - Boost API Development Velocity with Practical AI Tool...
apidays New York 2025 - Boost API Development Velocity with Practical AI Tool...apidays New York 2025 - Boost API Development Velocity with Practical AI Tool...
apidays New York 2025 - Boost API Development Velocity with Practical AI Tool...
apidays
 
apidays New York 2025 - Spring Modulith Design for Microservices by Renjith R...
apidays New York 2025 - Spring Modulith Design for Microservices by Renjith R...apidays New York 2025 - Spring Modulith Design for Microservices by Renjith R...
apidays New York 2025 - Spring Modulith Design for Microservices by Renjith R...
apidays
 
LONGSEM2024-25_CSE3015_ETH_AP2024256000125_Reference-Material-I.pptx
LONGSEM2024-25_CSE3015_ETH_AP2024256000125_Reference-Material-I.pptxLONGSEM2024-25_CSE3015_ETH_AP2024256000125_Reference-Material-I.pptx
LONGSEM2024-25_CSE3015_ETH_AP2024256000125_Reference-Material-I.pptx
vemuripraveena2622
 
apidays New York 2025 - Why I Built Another Carbon Measurement Tool for LLMs ...
apidays New York 2025 - Why I Built Another Carbon Measurement Tool for LLMs ...apidays New York 2025 - Why I Built Another Carbon Measurement Tool for LLMs ...
apidays New York 2025 - Why I Built Another Carbon Measurement Tool for LLMs ...
apidays
 
MEDIA_LITERACY_INDEX_OF_EDUCATORS_ENG.pdf
MEDIA_LITERACY_INDEX_OF_EDUCATORS_ENG.pdfMEDIA_LITERACY_INDEX_OF_EDUCATORS_ENG.pdf
MEDIA_LITERACY_INDEX_OF_EDUCATORS_ENG.pdf
OlhaTatokhina1
 
Chronic constipation presentaion final.ppt
Chronic constipation presentaion final.pptChronic constipation presentaion final.ppt
Chronic constipation presentaion final.ppt
DrShashank7
 
apidays New York 2025 - Computers are still dumb by Ben Morss (DeepL)
apidays New York 2025 - Computers are still dumb by Ben Morss (DeepL)apidays New York 2025 - Computers are still dumb by Ben Morss (DeepL)
apidays New York 2025 - Computers are still dumb by Ben Morss (DeepL)
apidays
 
Alcoholic liver disease slides presentation new.pptx
Alcoholic liver disease slides presentation new.pptxAlcoholic liver disease slides presentation new.pptx
Alcoholic liver disease slides presentation new.pptx
DrShashank7
 
apidays New York 2025 - Unifying OpenAPI & AsyncAPI by Naresh Jain & Hari Kri...
apidays New York 2025 - Unifying OpenAPI & AsyncAPI by Naresh Jain & Hari Kri...apidays New York 2025 - Unifying OpenAPI & AsyncAPI by Naresh Jain & Hari Kri...
apidays New York 2025 - Unifying OpenAPI & AsyncAPI by Naresh Jain & Hari Kri...
apidays
 
Math arihant handbook.pdf all formula is here
Math arihant handbook.pdf all formula is hereMath arihant handbook.pdf all formula is here
Math arihant handbook.pdf all formula is here
rdarshankumar84
 
apidays New York 2025 - Open Source and disrupting the travel distribution ec...
apidays New York 2025 - Open Source and disrupting the travel distribution ec...apidays New York 2025 - Open Source and disrupting the travel distribution ec...
apidays New York 2025 - Open Source and disrupting the travel distribution ec...
apidays
 
1022_ExtendEnrichExcelUsingPythonWithTableau_04_16+04_17 (1).pdf
1022_ExtendEnrichExcelUsingPythonWithTableau_04_16+04_17 (1).pdf1022_ExtendEnrichExcelUsingPythonWithTableau_04_16+04_17 (1).pdf
1022_ExtendEnrichExcelUsingPythonWithTableau_04_16+04_17 (1).pdf
elinavihriala
 
apidays New York 2025 - Building Scalable AI Systems by Sai Prasad Veluru (Ap...
apidays New York 2025 - Building Scalable AI Systems by Sai Prasad Veluru (Ap...apidays New York 2025 - Building Scalable AI Systems by Sai Prasad Veluru (Ap...
apidays New York 2025 - Building Scalable AI Systems by Sai Prasad Veluru (Ap...
apidays
 
PSUG 7 - 2025-06-03 - David Bianco on Splunk SURGe
PSUG 7 - 2025-06-03 - David Bianco on Splunk SURGePSUG 7 - 2025-06-03 - David Bianco on Splunk SURGe
PSUG 7 - 2025-06-03 - David Bianco on Splunk SURGe
Tomas Moser
 
Philippine-Constitution-and-Law in hospitality
Philippine-Constitution-and-Law in hospitalityPhilippine-Constitution-and-Law in hospitality
Philippine-Constitution-and-Law in hospitality
kikomendoza006
 
apidays New York 2025 - Why an SDK is Needed to Protect APIs from Mobile Apps...
apidays New York 2025 - Why an SDK is Needed to Protect APIs from Mobile Apps...apidays New York 2025 - Why an SDK is Needed to Protect APIs from Mobile Apps...
apidays New York 2025 - Why an SDK is Needed to Protect APIs from Mobile Apps...
apidays
 
Ch01_Introduction_to_Information_Securit
Ch01_Introduction_to_Information_SecuritCh01_Introduction_to_Information_Securit
Ch01_Introduction_to_Information_Securit
KawukiDerrick
 
Media_Literacy_Index_of_Media_Sector_Employees.pdf
Media_Literacy_Index_of_Media_Sector_Employees.pdfMedia_Literacy_Index_of_Media_Sector_Employees.pdf
Media_Literacy_Index_of_Media_Sector_Employees.pdf
OlhaTatokhina1
 
Али махмуд to The teacm of ghsbh to fortune .pptx
Али махмуд to The teacm of ghsbh to fortune .pptxАли махмуд to The teacm of ghsbh to fortune .pptx
Али махмуд to The teacm of ghsbh to fortune .pptx
palr19411
 
Arrays in c programing. practicals and .ppt
Arrays in c programing. practicals and .pptArrays in c programing. practicals and .ppt
Arrays in c programing. practicals and .ppt
Carlos701746
 
apidays New York 2025 - Boost API Development Velocity with Practical AI Tool...
apidays New York 2025 - Boost API Development Velocity with Practical AI Tool...apidays New York 2025 - Boost API Development Velocity with Practical AI Tool...
apidays New York 2025 - Boost API Development Velocity with Practical AI Tool...
apidays
 
apidays New York 2025 - Spring Modulith Design for Microservices by Renjith R...
apidays New York 2025 - Spring Modulith Design for Microservices by Renjith R...apidays New York 2025 - Spring Modulith Design for Microservices by Renjith R...
apidays New York 2025 - Spring Modulith Design for Microservices by Renjith R...
apidays
 
LONGSEM2024-25_CSE3015_ETH_AP2024256000125_Reference-Material-I.pptx
LONGSEM2024-25_CSE3015_ETH_AP2024256000125_Reference-Material-I.pptxLONGSEM2024-25_CSE3015_ETH_AP2024256000125_Reference-Material-I.pptx
LONGSEM2024-25_CSE3015_ETH_AP2024256000125_Reference-Material-I.pptx
vemuripraveena2622
 
apidays New York 2025 - Why I Built Another Carbon Measurement Tool for LLMs ...
apidays New York 2025 - Why I Built Another Carbon Measurement Tool for LLMs ...apidays New York 2025 - Why I Built Another Carbon Measurement Tool for LLMs ...
apidays New York 2025 - Why I Built Another Carbon Measurement Tool for LLMs ...
apidays
 

Automation With Selenium

  • 1. Trivia: Selenium has a strong bonding affinity with mercury and arsenic, so if you eat fish, it’s a good idea to choose types of fish high in selenium. But although it’s a necessary nutrient, more than a trace amount of it will have you pushing up daisies in a heartbeat. (Or lack thereof.) The name for the Selenium, the browser automation tool, comes from a joke made by founders in an email, mocking their competitor “Mercury” – since selenium is a cure for mercury poisoning. The rest of the devs took it and ran with it.
  • 2. What’s Selenium? Selenium automates browsers for testing purposes, and also can be used for automating mind-numbing, soul-crushing tasks (like searching for “new” users in PUMA and changing their status to “active”). The primary products are Selenium IDE, Selenium WebDriver (aka Selenium 2), and Selenium Server. Examples/info based on using Java w/Eclipse ( v. Kepler has Maven integrated – Maven will import all necessary Se dependencies), Firebug (cool inspection tool), Firepath
  • 3. Selenium Server needs to be used for: • Distributing tests over multiple machines or VMs at once • Connecting to a remote machine that has a browser version that’s not on your specific machine • Instructions for Java at http://code.google.com/p/selenium/wiki/Grid2
  • 4. Selenium IDE • Runs as a Firefox add-on and can record, edit, play, and debug tests. • Can record user actions or be edited by hand, then played back as browser emulation. It’s as though a ghost were using your computer! Aaaagh!!! • It can be experimentally exported in several code languages • Brilliant if you need to script a ton of crap, super fast (see February VA move) • Creates a good, lightning-fast base for any automated, which can then be coded as necessary • It’s a nice introduction to Selenese, Selenium’s set of commands
  • 6. Selenium IDE limitations • No conditional or looping statements • Limited to Firefox out of the box • Formatted reporting not supported • Uses html language – exporting in others is currently ‘experimental’ – tends to import defunct dependencies and other extraneous crap • Can’t read from external databases or files
  • 7. Selenium Webdriver (aka Se 2) • It’s a collection of bindings which drives browsers natively as a user would, either locally or remotely with Selenium Server • It makes direct calls to a browser using the browser’s native support for automation • Can be used in Java (recommended), C#, Perl, PHP, Python, and Ruby • Has WebDrivers for IE, Chrome, Firefox, Safari, IOS, Android and Opera. Chrome and IE require a separate server download.
  • 8. Webdriver has a few limitations… • Like everything else, has a few bugs • It’s Open Source – tech problems need to be resolved through Se community, and you’re on your own to learn it • Can only automate web applications • No inbuilt reporting capabilities • IE, and to a lesser extent, Chrome, can be buggy (recall that it uses a browsers native support for automation…..)
  • 9. What can Webdriver do? • Finding, retrieving, and verifying/asserting web elements by Name, ID, TagName, Class, LinkText, PartialLinkText, Xpath, and CSS • Mouse-based interactions including mouse position by absolute (using x,y) or relative, clicking at current or specified locations or elements, click and hold, release, drag and drop, double click, right click • Keyboard interactions: Typing text, multiple keys (such as Ctrl + PrntScrn), key up/down • Taking screenshots, accepting security alerts, locating/switching between windows, executing custom Javascript, enabling browsers to interact with window alerts, navigating back/forward, implicit/explicit waits, downloading/copying files, permissioning files to be executable and much more both universal and specific to individual browsers
  • 10. Success! Generic success output – everything works as expected. Success and fail reports can be coded with as much or little detail as you like by conditional output to the console.
  • 11. Example of failed test; element “Agout” not found. Problematic line on failure trace, below – Assertion Error.
  • 12. Selenium website – seleniumhq.org The website will tell you where to download and how to set it up (but not how to use it). Helpful book on Selenium for developers using java: “Selenium Webdriver Practical Guide” by Satya Avasarala If you’d like to use Selenium, make sure you don’t seek out any info before about 6 months ago. It always changes fast, but in the last few months has undergone huge changes. Search on “Selenium Webdriver”.