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)

PPT
Selenium
Daksh Sharma
 
PPTX
Web UI Tests: Introduce UI tests using Selenium
Peyman Fakharian
 
PPT
Selenium Primer
Debashish Chakrabarty
 
PPT
Selenium ide material (2)
Sriram Angajala
 
PPT
Selenium using C# by Yogesh Kumar
Software Testing Board
 
PPT
Selenium (2)
onlinemindq
 
PPT
Selenium (2)
onlinemindq
 
PPTX
Selenium Automation
Anuradha Malalasena
 
PPTX
Selenium
nil65
 
PPTX
Selenium.ppt
onlinemindq
 
PPTX
Selenium Open Source Tool
onlinemindq
 
PDF
Selenium - The Way Of Success
Zbyszek Mockun
 
PDF
Learning selenium sample
Minnu Jayaprakash
 
PPTX
Selenium tutorial
mindqqa
 
PPTX
Akash 2013CA05 software testing presentation -selenium
Akash Verma
 
PPTX
Test automation using selenium
Tờ Rang
 
PPT
Selenium Ide Tutorials
gueste1e4db
 
PDF
How To Use Selenium Successfully (Java Edition)
Sauce Labs
 
PDF
How To Use Selenium Successfully (Java Edition)
Dave Haeffner
 
PPTX
Selenium WebDriver training
Vijay Krishnan Ramaswamy
 
Selenium
Daksh Sharma
 
Web UI Tests: Introduce UI tests using Selenium
Peyman Fakharian
 
Selenium Primer
Debashish Chakrabarty
 
Selenium ide material (2)
Sriram Angajala
 
Selenium using C# by Yogesh Kumar
Software Testing Board
 
Selenium (2)
onlinemindq
 
Selenium (2)
onlinemindq
 
Selenium Automation
Anuradha Malalasena
 
Selenium
nil65
 
Selenium.ppt
onlinemindq
 
Selenium Open Source Tool
onlinemindq
 
Selenium - The Way Of Success
Zbyszek Mockun
 
Learning selenium sample
Minnu Jayaprakash
 
Selenium tutorial
mindqqa
 
Akash 2013CA05 software testing presentation -selenium
Akash Verma
 
Test automation using selenium
Tờ Rang
 
Selenium Ide Tutorials
gueste1e4db
 
How To Use Selenium Successfully (Java Edition)
Sauce Labs
 
How To Use Selenium Successfully (Java Edition)
Dave Haeffner
 
Selenium WebDriver training
Vijay Krishnan Ramaswamy
 
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
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 

Maintainable UI Tests with Selenium and C#