SlideShare une entreprise Scribd logo
1  sur  16
Télécharger pour lire hors ligne
Taming Dino-Frameworks
with NSelene
@yashaka
Preface…
Taming Dino-Frameworks
with NSelene
C# Version
Plan
GIVEN project with legacy selenium-based dinosaur-
framework
AND problems with stability, boilerplate code
WHEN believe in evolution :)
THEN let’s integrate modern solutions like Selenide/NSelene
into legacy code
Coding Session
c# src: https://github.com/yashaka/talks/tree/master/
TamingDinoFrameworksWithNSelene
java src: https://github.com/yashaka/talks/tree/master/
taming-dino-frameworks-with-selenide
Summary
• Default “implicit waits for visibility” in a few “code
symbols”
• New more stable and concise code with modern tool
• Full interoperability
• informative error messages
• Unstable behaviour of legacy code? => refactor
needed parts to new style
Full Interoperability.
How?
Full Access to original Driver
Procedural Approach
DoNewStuff()
GetWebDriver().DoWhateverYouWant()…

Full Access to original Driver
OOP Approach
wrappedDriver = new FirefoxDriver();
driver = new SeleneDriver(wrappedDriver);
driver.DoNewStuff()
wrappedDriver.DoWhateverYouWant()…

Interfaces Compatibility
SeleneElement implements IWebElement
SeleneCollection implements IList<IWebElement>,
IReadOnlyCollection<IWebElement>, etc.

SeleneDriver implements IWebDriver
Power. How?
• SeleneElement = IWebElement as Dynamic
Proxy + Implicit Smart Waits + Handy Asserts
• SeleneCollection = IList<IWebElement> as
Dynamic Proxy + Implicit Smart Waits + Handy
Asserts
• SeleneDriver = IWebDriver finding
SeleneElement & SeleneCollection
• Informative errors everywhere ;)
What about Java?
• SelenideElement = WebElement as Dynamic Proxy +
Implicit Smart Waits + Handy Asserts
• ElementsCollection ~ List<WebElement> as Dynamic
Proxy + Implicit Smart Waits + Handy Asserts
• SelenideDriver can be implemented by your own
• soon will be added to Selenide
• Informative errors everywhere ;)

Selenide Examples
• Default “implicit waits for visibility” in a few “code
symbols”
• New more stable and concise code with modern tool
• Unstable behaviour of legacy code? => refactor
needed parts to new style
Q&A
@yashaka
Thank You
facebook.com/yashaka
github.com/yashaka
github.com/yashaka/nselene
automician@gmail.com
courses.automician.com
“Widgets Workshop (Java) (ru)”
“Refactoring selenium waits and PageFactory course (Java)
(ru)”
“Refactoring selenium waits and PageFactory videos (c#) (ua)”
available at courses.automician.com
@yashaka
Next

Contenu connexe

Plus de Iakiv Kramarenko

Plus de Iakiv Kramarenko (7)

Отзывы на раннюю версию курса «Искусство Автоматизации с Java + Selenide»
Отзывы на раннюю версию курса «Искусство Автоматизации с Java + Selenide» Отзывы на раннюю версию курса «Искусство Автоматизации с Java + Selenide»
Отзывы на раннюю версию курса «Искусство Автоматизации с Java + Selenide»
 
Dont be fooled with BDD, automation engineer! ;)
Dont be fooled with BDD, automation engineer! ;)Dont be fooled with BDD, automation engineer! ;)
Dont be fooled with BDD, automation engineer! ;)
 
Selenide Alternative in Practice - Implementation & Lessons learned [Selenium...
Selenide Alternative in Practice - Implementation & Lessons learned [Selenium...Selenide Alternative in Practice - Implementation & Lessons learned [Selenium...
Selenide Alternative in Practice - Implementation & Lessons learned [Selenium...
 
Selenide alternative in Python - Introducing Selene [SeleniumCamp 2016]
Selenide alternative in Python - Introducing Selene [SeleniumCamp 2016]Selenide alternative in Python - Introducing Selene [SeleniumCamp 2016]
Selenide alternative in Python - Introducing Selene [SeleniumCamp 2016]
 
Write Selenide in Python 15 min
Write Selenide in Python 15 minWrite Selenide in Python 15 min
Write Selenide in Python 15 min
 
Automation is Easy! (python version)
Automation is Easy! (python version)Automation is Easy! (python version)
Automation is Easy! (python version)
 
Easy tests with Selenide and Easyb
Easy tests with Selenide and EasybEasy tests with Selenide and Easyb
Easy tests with Selenide and Easyb
 

Dernier

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
Safe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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 Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Taming dino framworks with n selene - qafest 2016