SlideShare a Scribd company logo
Selenide Review
And How To Start Using It In Legacy Selenium Tests
Alex, QA Automation (UI + API), Determine
Plan
1)What is Selenide?
2)Selenide quirks and features
3)Do you need Selenide?
4)Demo
5)Questions
What is Selenide?
Simple selectors
Selenide
$(WebElement)
$(By)
$(String)
Selenium
Webelement
WebDriver.findElement(By)
WebDriver.findElement(By.cssSelector(String))
.$x(xpath)
Selenide can do
$("table").$x(".//tr")
$("table").$$x(".//tr")
When Selenium needs
WebDriver.findElement(By.cssSelector("table")).findElement(By.xpath(".//tr"));
WebDriver.findElement(By.cssSelector("table")).findElements(By.xpath(".//tr"));
Other selectors
$(byText("Logout")); // search by exact text
$(withText("Logout")); // search by text (substring)
$(byTitle("Logout")); // search by "title" attribute
$(byAttribute("class", "g")); // search by attribute
$(byValue("example")); // search by "value" attribute
Scoping selectors
$("#mainElement").$("#subElement");
$("#customerContainer").find(".user_name");
$("li", 5); // looking for Nth element
$$("li").get(5);
Clicking actions
$("#submit").click();
$(".g").doubleClick();
$(".g").contextClick();
$("q").pressEnter();
$("q").pressTab();
Form actions
$("#login").setValue("John Doe");
$(".menu").selectOption(String text);
$(By.name("menu")).selectOptionByValue(String value);
selectRadio(By.name("user.gender"), "male");
$("#element")).hover();
Text Assertions && deal with Ajax
$("#element").shouldHave(text("abc"));
$("h1").shouldHave(exactText("Hello"))
$("h1").shouldHave(textCaseSensitive("Hellos*John"));
$("h1").shouldHave(exactTextCaseSensitive("Hello"));
$("#input").shouldNotHave(text("Hello"), text("World"));
Attribute Assertions && deal with Ajax
$("h1").shouldHave(css("font-size", "16px"));
$("#input").shouldHave(name("fname"));
$("#input").shouldHave(type("checkbox"));
$("#input").shouldHave(id("myForm"));
$("#input").shouldHave(attribute("id"[, "myForm"]));
My Favorite Assertions && deal with Ajax
$("input").shouldBe(visible, enabled); //visible | appear
$("input").shouldNotBe(visible, enabled);
$("input").shouldBe(not(visible, enabled));
$("input").shouldBe(exist); //present | exist
$("input").shouldBe(hidden); //hidden | disappear | not(visible)
$("input").shouldBe(readonly);
$("input").shouldBe(focused);
$(".errors").shouldBe(empty);
$("#element").should(exist);
Collections Assertions && deal with Ajax
$$(".errors").shouldHave(size(2));
$$("gs-title").shouldHave(sizeGreaterThan(5));
$$(".errors").shouldBe(empty);
$$(".errors").shouldHave(exactTexts("text 1", "text
2"));
$$(".errors").shouldHave(texts("text 1", "text 2"));
should... vs. waitUntil
should(...) == shouldBe(...) == shouldHave(...) → Synonyms
shouldNot(...) == shouldNotBe(...) == shouldNotHave(...) → Synonyms
Their timeout is set by Selenide configuration. For specific timeout use:
$("#username").waitUntil(matchesText("Johny"), 2000);
$("#username").waitUntil(not(matchesText("Noname")), 2000);
$("#username").waitUntil(visible, 5000);
For instant boolean verification use:
$("#username").is(visible);
Configuration
Configuration.timeout
Configuration.pollingInterval
Configuration.pageLoadStrategy // (none | normal | eager)
Configuration.startMaximized
Configuration.browser = "marionette"
...
WebDriverRunner
WebDriverRunner.source(); //returns source HTML code of
current page
WebDriverRunner.getWebDriver();
WebDriverRunner.setWebDriver(customWebDriver);
...
Add Selenium to project:
1. Open Selenide Quick Starts and use hints
2. For Legacy project use:
a. WebDriverRunner.setWebDriver(yourDriver);
3. Wrap WebElement in $(...) → $(legacyElement)
4. Start using full power of Selenide
Do you need
Selenide ?
Search “good code vs bad code” for this img.
Make tests more readable
$$(summaryResults).shouldHave(sizeGreaterThan(0))
.filter(Condition.visible).first().getText();
SelenideElement table = $(byText("First name")).closest(".v-table");
table.findAll(".v-table-header .v-table-header-cell")
.shouldHave(texts("First name", "Last name", "Email", "Phone number"
, "Street Address", "Postal Code", "City"));
Frequent Updates
1)https://github.com/codeborne/selenide
2)50 releases
3)34 contributors
4)asolntsev committed on GitHub 2 days ago (by September 13)
Demo
Questions?
Usefull links:
This demo:
https://github.com/alex-d-bondarev/selenide-demo
Selenide Quick Start:
http://selenide.org/quick-start.html
Selenide Cheat Sheet
https://gist.github.com/mkpythonanywhereblog/947633ba1bf0bc239639
Selenide Examples
https://github.com/selenide-examples
Thanks!
Contact me:
Oleksandr Bondarev
alex.d.bondarev@gmail.com

More Related Content

PDF
QA Fest 2019. Андрей Солнцев. Selenide для профи
PDF
Selenide
PDF
7 rules of simple and maintainable code
PPT
Oracle SQL, PL/SQL Performance tuning
PDF
오픈 소스 사용 매뉴얼
PPTX
Node.js Express
PPTX
Build RESTful API Using Express JS
PDF
Hacking Jenkins
QA Fest 2019. Андрей Солнцев. Selenide для профи
Selenide
7 rules of simple and maintainable code
Oracle SQL, PL/SQL Performance tuning
오픈 소스 사용 매뉴얼
Node.js Express
Build RESTful API Using Express JS
Hacking Jenkins

What's hot (20)

PPTX
JS Event Loop
PDF
쿠버네티스 오픈 소스와 클라우드 매니지드 서비스 접점 소개
PDF
Introduction to kotlin coroutines
PPTX
NodeJS - Server Side JS
PDF
Swift Programming Language
PPT
Advanced Sql Injection ENG
PDF
CNIT 129S Ch 4: Mapping the Application
PDF
Qualité de code et bonnes pratiques
PPTX
Cucumber BDD
PPTX
Kotlin presentation
PPTX
Introduction to cypress in Angular (Chinese)
PDF
JavaScript Fetch API
PDF
Step-by-Step Guide to Protecting Web Apps with Google reCAPTCHA
PDF
Spring Boot 소개
PDF
Express node js
PDF
How Shopify Scales Rails
PDF
From Generator to Fiber the Road to Coroutine in PHP
PDF
Introduction to BDD with Cucumber for Java
PPTX
Test Automation Framework with BDD and Cucumber
PPTX
Basic Concept of Node.js & NPM
JS Event Loop
쿠버네티스 오픈 소스와 클라우드 매니지드 서비스 접점 소개
Introduction to kotlin coroutines
NodeJS - Server Side JS
Swift Programming Language
Advanced Sql Injection ENG
CNIT 129S Ch 4: Mapping the Application
Qualité de code et bonnes pratiques
Cucumber BDD
Kotlin presentation
Introduction to cypress in Angular (Chinese)
JavaScript Fetch API
Step-by-Step Guide to Protecting Web Apps with Google reCAPTCHA
Spring Boot 소개
Express node js
How Shopify Scales Rails
From Generator to Fiber the Road to Coroutine in PHP
Introduction to BDD with Cucumber for Java
Test Automation Framework with BDD and Cucumber
Basic Concept of Node.js & NPM
Ad

Similar to Selenide review and how to start using it in legacy Selenium tests (20)

PPTX
Test automation with selenide
PPTX
Escape from the automation hell
PPTX
Selenide vs. Selenium: The War Of Technologies
PDF
PPT
Selenium Primer
PPTX
Selenium institute in bangalore
PPT
Selenium
PDF
SELENIUM PPT.pdf
PDF
SELENIUM PPT.pdf
PPTX
Basics of selenium containing features of selenium
PPT
Selenium ppt
PPT
Selenium ppt
PPT
Selenium Concepts
PDF
Selenium Handbook
PDF
Selenium web driver
PDF
Introduction to Selenium Webdriver - SpringPeople
ODP
Integrating Selenium testing infrastructure into Scala Project
PPTX
Selenium ui paradigm - DDD North 2
PDF
Automation Testing using Selenium Webdriver
PPT
Selenium classes in mumbai
Test automation with selenide
Escape from the automation hell
Selenide vs. Selenium: The War Of Technologies
Selenium Primer
Selenium institute in bangalore
Selenium
SELENIUM PPT.pdf
SELENIUM PPT.pdf
Basics of selenium containing features of selenium
Selenium ppt
Selenium ppt
Selenium Concepts
Selenium Handbook
Selenium web driver
Introduction to Selenium Webdriver - SpringPeople
Integrating Selenium testing infrastructure into Scala Project
Selenium ui paradigm - DDD North 2
Automation Testing using Selenium Webdriver
Selenium classes in mumbai
Ad

More from Provectus (20)

PPTX
Choosing the right IDP Solution
PPTX
Intelligent Document Processing in Healthcare. Choosing the Right Solutions.
PPTX
Choosing the Right Document Processing Solution for Healthcare Organizations
PPTX
MLOps and Data Quality: Deploying Reliable ML Models in Production
PPTX
AI Stack on AWS: Amazon SageMaker and Beyond
PPTX
Feature Store as a Data Foundation for Machine Learning
PPTX
MLOps and Reproducible ML on AWS with Kubeflow and SageMaker
PPTX
Cost Optimization for Apache Hadoop/Spark Workloads with Amazon EMR
PPTX
ODSC webinar "Kubeflow, MLFlow and Beyond — augmenting ML delivery" Stepan Pu...
PDF
"Building a Modern Data platform in the Cloud", Alex Casalboni, AWS Dev Day K...
PDF
"How to build a global serverless service", Alex Casalboni, AWS Dev Day Kyiv ...
PDF
"Automating AWS Infrastructure with PowerShell", Martin Beeby, AWS Dev Day Ky...
PDF
"Analyzing your web and application logs", Javier Ramirez, AWS Dev Day Kyiv 2...
PDF
"Resiliency and Availability Design Patterns for the Cloud", Sebastien Storma...
PDF
"Architecting SaaS solutions on AWS", Oleksandr Mykhalchuk, AWS Dev Day Kyiv ...
PDF
"Developing with .NET Core on AWS", Martin Beeby, AWS Dev Day Kyiv 2019
PDF
"How to build real-time backends", Martin Beeby, AWS Dev Day Kyiv 2019
PDF
"Integrate your front end apps with serverless backend in the cloud", Sebasti...
PDF
"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019
PPTX
How to implement authorization in your backend with AWS IAM
Choosing the right IDP Solution
Intelligent Document Processing in Healthcare. Choosing the Right Solutions.
Choosing the Right Document Processing Solution for Healthcare Organizations
MLOps and Data Quality: Deploying Reliable ML Models in Production
AI Stack on AWS: Amazon SageMaker and Beyond
Feature Store as a Data Foundation for Machine Learning
MLOps and Reproducible ML on AWS with Kubeflow and SageMaker
Cost Optimization for Apache Hadoop/Spark Workloads with Amazon EMR
ODSC webinar "Kubeflow, MLFlow and Beyond — augmenting ML delivery" Stepan Pu...
"Building a Modern Data platform in the Cloud", Alex Casalboni, AWS Dev Day K...
"How to build a global serverless service", Alex Casalboni, AWS Dev Day Kyiv ...
"Automating AWS Infrastructure with PowerShell", Martin Beeby, AWS Dev Day Ky...
"Analyzing your web and application logs", Javier Ramirez, AWS Dev Day Kyiv 2...
"Resiliency and Availability Design Patterns for the Cloud", Sebastien Storma...
"Architecting SaaS solutions on AWS", Oleksandr Mykhalchuk, AWS Dev Day Kyiv ...
"Developing with .NET Core on AWS", Martin Beeby, AWS Dev Day Kyiv 2019
"How to build real-time backends", Martin Beeby, AWS Dev Day Kyiv 2019
"Integrate your front end apps with serverless backend in the cloud", Sebasti...
"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019
How to implement authorization in your backend with AWS IAM

Recently uploaded (20)

PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Introduction to Artificial Intelligence
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
System and Network Administraation Chapter 3
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
L1 - Introduction to python Backend.pptx
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
top salesforce developer skills in 2025.pdf
PPTX
ai tools demonstartion for schools and inter college
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Understanding Forklifts - TECH EHS Solution
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Digital Strategies for Manufacturing Companies
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Introduction to Artificial Intelligence
Computer Software and OS of computer science of grade 11.pptx
System and Network Administraation Chapter 3
Digital Systems & Binary Numbers (comprehensive )
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
Design an Analysis of Algorithms I-SECS-1021-03
Operating system designcfffgfgggggggvggggggggg
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
L1 - Introduction to python Backend.pptx
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
top salesforce developer skills in 2025.pdf
ai tools demonstartion for schools and inter college
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
CHAPTER 2 - PM Management and IT Context
Understanding Forklifts - TECH EHS Solution
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Digital Strategies for Manufacturing Companies

Selenide review and how to start using it in legacy Selenium tests