SlideShare a Scribd company logo
MaintainableUITests
withSelenium andC#
Jon Limjap
Microsoft MVP forVisual Studio and DevelopmentTechnologies
Philippine Software Industry Association –Tech Council Member
About Me
 Microsoft MVP forVisual Studio and Development
Technologies
 Lead, Philippine .NET Users Group
 PSIATechnical Council Member
 http://jonlimjap.net
 @lattex | jonlimjap@gmail.com
Philippine .NET
UsersGroup
(PHINUG)
facebook.com/groups/phinug
What is Selenium
Selenium basics
Improving Selenium tests with
PageObjects
SeleniumOverview
What is
Selenium?
Quite simply, “Selenium automates
browsers”
Originally started in 2004 by Jason
Huggins as an internal tool at
ThoughtWorks
Written in Java
Useful not only for testing but for
automated tasks, webpage scraping, etc.
Testing
frameworks
powered by
Selenium
 Java
 JUnit
 TestNG
 .NET
 NUnit
 MSTest
 JavaScript
 WebdriverJS
 WebdriverIO
 NightwatchJS
 PHP
 Behat + Menk
 Ruby
 RSpec
 Python
 Robot Framework
 PyUnit
 Py.Test
Selenium Basics
Selenium
Basics
WebDrivers
WebElements
Find Element By
Wait
WebDrivers
DifferentWebdriver for different browsers
Native implementation
 Firefox
Third Party implementations
 Chrome
 IE
 Opera
 Safari
 Edge
 PhantomJS
 Etc…
WebElement
One node of an HTML document
Can contain childWebElements
Properties
 Enabled (bool)
 Selected (bool)
 TagName (string)
 Text (string)
 Etc…
WebElement
Action Methods
 Clear
 Click
 SendKeys
 Submit
Other Userful Methods
 FindElement / FindElements
 GetAttribute
 GetCssValue
Find Elements
By
FindElement/FindElements returns a
WebElement object
These are filtered using the “By” object
 ClassName
 CssSelector
 Name
 Id
 LinkText
 PartialLinkText
 TagName
 Xpath
Chrome DeveloperTools is your friend
 Copy Selector
 Copy XPath
Find Elements
By
Chrome DeveloperTools is your friend
 Copy Selector
 Copy XPath
Selenium in
VisualStudio
Third parties found ways to support
Selenium as early asVisual Studio 2005
via NUnit and Selenium.NET
MSTest support added inVisual Studio
2013
 You can still use NUnit or other test runners
Vastly easier nowadays due to Nuget
Demo
Selenium inVisual Studio using MSTest + C#
ImprovingSelenium
tests with PageObjects
Making tests look saner
PageObjects
Create a class representing each page to
be tested
Create properties forWebElements in the
page
Make methods for repeatedly called
routines
Demo
PageObjects
Q &A |Thank you!
Join PHINUG’s Facebook Group facebook.com/groups/phinug

More Related Content

What's hot (20)

DOCX
Selenium webdriver course content rakesh hansalia
Rakesh Hansalia
 
PDF
Efficient Automated Test Creation With Selenium IDE Plugins
Samit Badle
 
PPTX
Selenium Testing
Shreshtt Bhatt
 
PPTX
Introduction to Selenium WebDriver
SpringPeople
 
PPTX
Selenium IDE
b4usolution .
 
PPTX
Selenium ui paradigm - DDD North 2
Nathan Gloyn
 
PPTX
Selenium
Batch2016
 
PDF
Selenium Interview Questions and Answers For Freshers And Experienced | Edureka
Edureka!
 
PPT
Selenium (1)
onlinemindq
 
PDF
Selenium IDE and Beyond
Samit Badle
 
PDF
Selenium IDE Introduction, Installation and Working
Disha Srivastava
 
PPT
Selenium 2: The Future of Selenium is now!
AutomatedTester
 
PPT
Selenium By Pravin Mishra
Pravin Mishra
 
PDF
Introduction to Selenium Automation
Mindfire Solutions
 
PDF
Basics of Selenium IDE,Core, Remote Control
usha kannappan
 
PPTX
Selenium topic 3 -Web Driver Basics
ITProfessional Academy
 
PPTX
Automation - web testing with selenium
Tzirla Rozental
 
PPTX
Selenium basic
Dasun Eranthika
 
PDF
Automated Web Testing With Selenium
Deepak Mittal
 
PPTX
Selenium
Andrew Krug
 
Selenium webdriver course content rakesh hansalia
Rakesh Hansalia
 
Efficient Automated Test Creation With Selenium IDE Plugins
Samit Badle
 
Selenium Testing
Shreshtt Bhatt
 
Introduction to Selenium WebDriver
SpringPeople
 
Selenium IDE
b4usolution .
 
Selenium ui paradigm - DDD North 2
Nathan Gloyn
 
Selenium
Batch2016
 
Selenium Interview Questions and Answers For Freshers And Experienced | Edureka
Edureka!
 
Selenium (1)
onlinemindq
 
Selenium IDE and Beyond
Samit Badle
 
Selenium IDE Introduction, Installation and Working
Disha Srivastava
 
Selenium 2: The Future of Selenium is now!
AutomatedTester
 
Selenium By Pravin Mishra
Pravin Mishra
 
Introduction to Selenium Automation
Mindfire Solutions
 
Basics of Selenium IDE,Core, Remote Control
usha kannappan
 
Selenium topic 3 -Web Driver Basics
ITProfessional Academy
 
Automation - web testing with selenium
Tzirla Rozental
 
Selenium basic
Dasun Eranthika
 
Automated Web Testing With Selenium
Deepak Mittal
 
Selenium
Andrew Krug
 

Similar to Maintainable UI Tests with Selenium and C# (20)

PPTX
Presentation on Introduction to Selenium
hafizrizwanumar10
 
PDF
What is Selenium Automation Testing.pdf
AnanthReddy38
 
PDF
Best selenium training eduxfactor
eduxfactor .com
 
PPTX
Selenium testing tool
webomates
 
PDF
Best selenium training institute in hyderabad
VamsiNihal
 
PPTX
Selenium training eduxfactor
SayyedYusufali
 
PDF
best selenium training institute in hyderabad
DIGITALSAI1
 
PPTX
Best selenium training institute in hyderabad
VamsiNihal
 
PPTX
best selenium training institute in hyderabad
DIGITALSAI1
 
PPTX
automation courses near me
SaiprasadVella
 
PPTX
Selenium training eduxfactor
KapilSai3
 
PDF
selenium with python training
SaiprasadVella
 
PDF
automation courses near me
SaiprasadVella
 
PPTX
Selenium training eduxfactor
SayyedYusufali
 
PDF
Selenium training
sarana20
 
PDF
best selenium training institute in Hyderabad
SaiprasadVella
 
PDF
software testing training institute in hyderabad
KhalidQureshi31
 
PPTX
selenium with python training
SaiprasadVella
 
PDF
Selenium training eduxfactor-converted
SayyedYusufali
 
PPTX
Selenium Training - Eduxfactor.pptx
Akhilkumar590509
 
Presentation on Introduction to Selenium
hafizrizwanumar10
 
What is Selenium Automation Testing.pdf
AnanthReddy38
 
Best selenium training eduxfactor
eduxfactor .com
 
Selenium testing tool
webomates
 
Best selenium training institute in hyderabad
VamsiNihal
 
Selenium training eduxfactor
SayyedYusufali
 
best selenium training institute in hyderabad
DIGITALSAI1
 
Best selenium training institute in hyderabad
VamsiNihal
 
best selenium training institute in hyderabad
DIGITALSAI1
 
automation courses near me
SaiprasadVella
 
Selenium training eduxfactor
KapilSai3
 
selenium with python training
SaiprasadVella
 
automation courses near me
SaiprasadVella
 
Selenium training eduxfactor
SayyedYusufali
 
Selenium training
sarana20
 
best selenium training institute in Hyderabad
SaiprasadVella
 
software testing training institute in hyderabad
KhalidQureshi31
 
selenium with python training
SaiprasadVella
 
Selenium training eduxfactor-converted
SayyedYusufali
 
Selenium Training - Eduxfactor.pptx
Akhilkumar590509
 
Ad

More from Jacinto Limjap (11)

PPTX
Refactoring to Microservices
Jacinto Limjap
 
PPTX
Donetconf2016: The Future of C#
Jacinto Limjap
 
ODP
C# and the Evolution of a Programming Language
Jacinto Limjap
 
PPTX
SQL vs NoSQL
Jacinto Limjap
 
PPTX
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Jacinto Limjap
 
PPTX
N-tier and oop - moving across technologies
Jacinto Limjap
 
PPTX
MSDN Ramp-Up Part 3: Business logic
Jacinto Limjap
 
PPT
Developing windows phone 7 applications
Jacinto Limjap
 
PPT
Automated Unit Testing in Silverlight for Windows Phone 7
Jacinto Limjap
 
PPTX
Dynamics & Object Runtime Composition with C# 4.0
Jacinto Limjap
 
PPTX
Three Developer Abilities They Dont Teach In College
Jacinto Limjap
 
Refactoring to Microservices
Jacinto Limjap
 
Donetconf2016: The Future of C#
Jacinto Limjap
 
C# and the Evolution of a Programming Language
Jacinto Limjap
 
SQL vs NoSQL
Jacinto Limjap
 
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Jacinto Limjap
 
N-tier and oop - moving across technologies
Jacinto Limjap
 
MSDN Ramp-Up Part 3: Business logic
Jacinto Limjap
 
Developing windows phone 7 applications
Jacinto Limjap
 
Automated Unit Testing in Silverlight for Windows Phone 7
Jacinto Limjap
 
Dynamics & Object Runtime Composition with C# 4.0
Jacinto Limjap
 
Three Developer Abilities They Dont Teach In College
Jacinto Limjap
 
Ad

Recently uploaded (20)

PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 

Maintainable UI Tests with Selenium and C#