SlideShare a Scribd company logo
1 of 34
Download to read offline
What is the taste of
the Selenide?
MARINSKY ROMA
TICKETS.UA
Selenium
 Selenium is an umbrella project encapsulating a variety
of tools and libraries enabling web browser automation
 WebDriver, Selenium IDE, Selenium Grid
 W3C WebDriver specification
Selenium
 Need allot of boilerplate for:
 Init browsers
 Wait for availability of any elements
 Screenshots
 Logs
 Upload and download files
 PageObject and PageFactory
 Wrapper around Selenium WebDriver not a framework
 Fluent API for simple using all features
 Supporting AJAX for stable tests, forgot: StaleElementExaptions
 Simple waiting for any conditions for each element
 Multifunctional Selectors
 Simple Configurations for project with tests
UI Tests: Selenide
Selenide.class
$(css), $(By by), $x(xpath), $(By, index)
$$(css), $$(By by), $$x(xpath)
open(…) //URL, Login, PF
selectRadio(By, withText)
switchTo()
page() //for PageFactory *initElements(.class)*
Selenide.class
 executeJavaScript()
 actions()
 Wait()
 clearAllCookies()
 clearLocalStorage()
 zoom()
 screenshot()
SelenideElement actions
 followLink(), click(), contextClick()
 setValue(string), val(), append()
 uploadFile()
 selectOption(By, text)
 scrollTo(), hover(), dragAndDrop()
 getText(), getValue(), getAttribute()
Should’ы and Wait’ы
 should(Condition condition)
shouldHave()
shouldBe()
 shouldNot(Condition condition)
shouldNotHave()
shouldNotBe()
waitUntil(Condition, timeout, pooling)
waitWhile(Condition, timeout, pooling)
waitUntil(Condition, timeout)
waitWhile(Condition, timeout)
ElementCollection actions
shouldHaveSize(Condition)
get(index), first(), last()
filter(Condition), filterBy(Condition) -> collection
find(Condition), findBy(Condition) -> element
exclude(Condition), excludeBy(Condition)
Conditions
 visible, appear
 exist, present
 hidden, disappear
 attribute(), attribute(name, value)
 value(), name(), type(), id(),
cssClass()
 empty
 matchText(regex), text(),
exactText(), textCaseSensitive(),
exactTextCaseSensitive()
 focused, enabled, disabled,
 selected, checked, readOnly
 not(Condition), and(because,Condition),
or(because, Condition), be(), have()
CollectionConditions
 get()
 size(), sizeGreaterThan(),
sizeGreaterThanOrEqual()
 sizeLessThan(),
sizeLessThanOrEqaul(),
sizeNotEqual()
 texts(…), exactTexts(…)
 empty
WebDriverRunner
 isFirefox, isHtmlUnit, isChrome, isSafari,
isHeadless, isEdge…
 source()
 url(), currentFrameUrl()
 clearBrowserCache()
 supportsModalDialogs(),
supportsJavascript()
 Browser name constants(chrome,ff...)
 addListeners(WebDriverEventListener)
 setWebDriver(customDriver),
closeWebDriver()
 getWebDriver(),
getAndCheckWebDriver(),
 hasWebDriverStarted()
 setProxy()
Configuration
 clickViaJs, fastSetValue
 captureJsErrors
 screenshots, savePageSource,
reportFolder, reportsUrl
 dismissModalDialogs
 selectorMode [css, sizzle]
 assertionMode [soft, strict]
 fileDownload [httpget, proxy]
 baseUrl, browser
 timeout, collectionTimeout
 poolingInterval,
coollectionPoolingInterval
 holdBrowserOpen,
reopenBrowserOnFail,
closeBrowserMs
 remote
 browserSize, startMaximized
Extra selectors and parent
selectors
 withText(), byText()
 byAttribute(), by()
 byTitle(), byValue(), byId(), byName()
 byXpath()
 byLinkText(), byPartialLinkText()
 byCssSelector()
 byClassName
 $(“tr td.dig”).parent()
 $(“tr td.dig”).closest(“th”)
Bonus features #1
Configuration.fileDownload = PROXY;
File testFile = $(“#file”).download();
 Download files via proxy
Use when form have no href or other url
for start downloading file
Download file starts after click on the
form.
Will starts proxy server witch intercepts
downloading files
Bonus features #2
You can use:
LoginForm loginForm = new LoginForm();
loginForm.submit.click();
Instead of:
LoginForm loginForm = page(LoginForm.class);
loginForm.submit.click();
 Selenide PageFactory
You can use:
SelenideElement submit = $(“#submit”),
loginInput = $(“input.login”);
Instead of:
@FindBy(css=“#submit”)
SelenideElement submit;
@FindBy(css=“input.login”)
SelenideElement loginInput;
Bonus features #3
 Simple Logger
When you need logging all element
actions do not use log4j and others
Use:
@Rule || @Listener
public TextReport = new TextReport();
Or
new TextReport().onFailedTest(true)
.onSucceededTest(false)
Bonus features #4
 Screenshots
When you need screenshots on each
fail test or more
Use:
@Rule || @Listener
public ScreenShooter = ScreenShooter.failedTests();
Or: ScreenShooter.failedTests(). succeededTests();
How to start?
 Include dependencies: selenide & webdrivermanager
 Use static imports for Selenide’s methods
 Keep it simple stupid!
WebDriver Manager
 https://github.com/bonigarcia/webdrivermanager
Myths about Selenide
 Will be it enterprise? – No
 Selenide will do tests slower! – No
 Need to know Selenium at the first! – No
 Selenide it isn’t OOP framework! – No
 Does not have typed elements! – So what?
It’s boilerplate
Links & contacts
 github.com/rmarinsky
 fb.com/newromka
 ru.selenide.org
 software-testers.herokuapp.com
 automated-testing.info/
Thank you for attention
Questions?

More Related Content

What's hot

Introduction to Selenium and Ruby
Introduction to Selenium and RubyIntroduction to Selenium and Ruby
Introduction to Selenium and RubyYnon Perek
 
Browser-Based testing using Selenium
Browser-Based testing using SeleniumBrowser-Based testing using Selenium
Browser-Based testing using Seleniumret0
 
前端網頁自動測試
前端網頁自動測試 前端網頁自動測試
前端網頁自動測試 政億 林
 
Protractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applicationsProtractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applicationsLudmila Nesvitiy
 
Selenium Automation Using Ruby
Selenium Automation Using RubySelenium Automation Using Ruby
Selenium Automation Using RubyKumari Warsha Goel
 
JBoss Negotiation in AS7
JBoss Negotiation in AS7JBoss Negotiation in AS7
JBoss Negotiation in AS7Josef Cacek
 
Selenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep ShardaSelenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep ShardaEr. Sndp Srda
 
Selenium WebDriver
Selenium WebDriverSelenium WebDriver
Selenium WebDriverRajathi-QA
 
Scraping recalcitrant web sites with Python & Selenium
Scraping recalcitrant web sites with Python & SeleniumScraping recalcitrant web sites with Python & Selenium
Scraping recalcitrant web sites with Python & SeleniumRoger Barnes
 
Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)Deutsche Post
 
Build RESTful API Using Express JS
Build RESTful API Using Express JSBuild RESTful API Using Express JS
Build RESTful API Using Express JSCakra Danu Sedayu
 
Chrome Devtools Protocol via Selenium/Appium (Japanese)
Chrome Devtools Protocol via Selenium/Appium (Japanese)Chrome Devtools Protocol via Selenium/Appium (Japanese)
Chrome Devtools Protocol via Selenium/Appium (Japanese)Kazuaki Matsuo
 
[DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)
[DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)[DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)
[DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)Scrum Breakfast Vietnam
 
Javascript Bundling and modularization
Javascript Bundling and modularizationJavascript Bundling and modularization
Javascript Bundling and modularizationstbaechler
 
Building and Managing Projects with Maven
Building and Managing Projects with MavenBuilding and Managing Projects with Maven
Building and Managing Projects with MavenKhan625
 
Kotlin server side frameworks
Kotlin server side frameworksKotlin server side frameworks
Kotlin server side frameworksKen Yee
 

What's hot (20)

Introduction to Selenium and Ruby
Introduction to Selenium and RubyIntroduction to Selenium and Ruby
Introduction to Selenium and Ruby
 
Selenium
SeleniumSelenium
Selenium
 
Browser-Based testing using Selenium
Browser-Based testing using SeleniumBrowser-Based testing using Selenium
Browser-Based testing using Selenium
 
前端網頁自動測試
前端網頁自動測試 前端網頁自動測試
前端網頁自動測試
 
Protractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applicationsProtractor framework – how to make stable e2e tests for Angular applications
Protractor framework – how to make stable e2e tests for Angular applications
 
Selenium Automation Using Ruby
Selenium Automation Using RubySelenium Automation Using Ruby
Selenium Automation Using Ruby
 
JBoss Negotiation in AS7
JBoss Negotiation in AS7JBoss Negotiation in AS7
JBoss Negotiation in AS7
 
Selenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep ShardaSelenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep Sharda
 
Selenium WebDriver
Selenium WebDriverSelenium WebDriver
Selenium WebDriver
 
Scraping recalcitrant web sites with Python & Selenium
Scraping recalcitrant web sites with Python & SeleniumScraping recalcitrant web sites with Python & Selenium
Scraping recalcitrant web sites with Python & Selenium
 
Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)
 
Zk doc1
Zk doc1Zk doc1
Zk doc1
 
Selenium drivers
Selenium driversSelenium drivers
Selenium drivers
 
Build RESTful API Using Express JS
Build RESTful API Using Express JSBuild RESTful API Using Express JS
Build RESTful API Using Express JS
 
Chrome Devtools Protocol via Selenium/Appium (Japanese)
Chrome Devtools Protocol via Selenium/Appium (Japanese)Chrome Devtools Protocol via Selenium/Appium (Japanese)
Chrome Devtools Protocol via Selenium/Appium (Japanese)
 
[DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)
[DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)[DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)
[DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)
 
Javascript Bundling and modularization
Javascript Bundling and modularizationJavascript Bundling and modularization
Javascript Bundling and modularization
 
Building and Managing Projects with Maven
Building and Managing Projects with MavenBuilding and Managing Projects with Maven
Building and Managing Projects with Maven
 
Maven
Maven Maven
Maven
 
Kotlin server side frameworks
Kotlin server side frameworksKotlin server side frameworks
Kotlin server side frameworks
 

Viewers also liked

Олександр Хотемський “Обзор архитектуры Selenium WebDriver”
Олександр Хотемський “Обзор архитектуры Selenium WebDriver”Олександр Хотемський “Обзор архитектуры Selenium WebDriver”
Олександр Хотемський “Обзор архитектуры Selenium WebDriver”Dakiry
 
Андрiй Затулло “Трансформация тестировщика или о чем не говорят на курсах”
Андрiй Затулло “Трансформация тестировщика или о чем не говорят на курсах”Андрiй Затулло “Трансформация тестировщика или о чем не говорят на курсах”
Андрiй Затулло “Трансформация тестировщика или о чем не говорят на курсах”Dakiry
 
Anton Serputko Workshop “Тестування продуктивності”
Anton Serputko Workshop “Тестування продуктивності”Anton Serputko Workshop “Тестування продуктивності”
Anton Serputko Workshop “Тестування продуктивності”Dakiry
 
Анастасія Васенко “Why don’t you need BDD?”
Анастасія Васенко “Why don’t you need BDD?”Анастасія Васенко “Why don’t you need BDD?”
Анастасія Васенко “Why don’t you need BDD?”Dakiry
 
Георгій Гульов “Тестування мобільних додатків: з чого починати?”
Георгій Гульов “Тестування мобільних додатків: з чого починати?”Георгій Гульов “Тестування мобільних додатків: з чого починати?”
Георгій Гульов “Тестування мобільних додатків: з чого починати?”Dakiry
 
Денис Павленко “CRUD&A як ще одна НОВА техніка тест дизайну” (CRUDA – їCreate...
Денис Павленко “CRUD&A як ще одна НОВА техніка тест дизайну” (CRUDA – їCreate...Денис Павленко “CRUD&A як ще одна НОВА техніка тест дизайну” (CRUDA – їCreate...
Денис Павленко “CRUD&A як ще одна НОВА техніка тест дизайну” (CRUDA – їCreate...Dakiry
 
Ольга Гриник “Make your tester’s life easier with automated deployment. A Rea...
Ольга Гриник “Make your tester’s life easier with automated deployment. A Rea...Ольга Гриник “Make your tester’s life easier with automated deployment. A Rea...
Ольга Гриник “Make your tester’s life easier with automated deployment. A Rea...Dakiry
 
Dmytro Yermolov “Want better quality ? Rethinking QA and BA interaction”
Dmytro Yermolov “Want better quality ? Rethinking QA and BA interaction”Dmytro Yermolov “Want better quality ? Rethinking QA and BA interaction”
Dmytro Yermolov “Want better quality ? Rethinking QA and BA interaction”Dakiry
 
Дмитро Горін “Хотите расти в PM’ы? Уверенны?”
Дмитро Горін “Хотите расти в PM’ы? Уверенны?”Дмитро Горін “Хотите расти в PM’ы? Уверенны?”
Дмитро Горін “Хотите расти в PM’ы? Уверенны?”Dakiry
 
Валентин Будкін “BPMN з людським обличчям”
Валентин Будкін “BPMN з людським обличчям”Валентин Будкін “BPMN з людським обличчям”
Валентин Будкін “BPMN з людським обличчям”Dakiry
 
Діана Пінчук “How to test mobile SDK and do not loose faith in yourself “
Діана Пінчук “How to test mobile SDK and do not loose faith in yourself “Діана Пінчук “How to test mobile SDK and do not loose faith in yourself “
Діана Пінчук “How to test mobile SDK and do not loose faith in yourself “Dakiry
 
Людмила Гулик “Организация бизнес-процесса работы с требованиями в продуктово...
Людмила Гулик “Организация бизнес-процесса работы с требованиями в продуктово...Людмила Гулик “Организация бизнес-процесса работы с требованиями в продуктово...
Людмила Гулик “Организация бизнес-процесса работы с требованиями в продуктово...Dakiry
 
Дмитро Берднік “Role of Regulation at Fintech Software Development”
Дмитро Берднік “Role of Regulation at Fintech Software Development”Дмитро Берднік “Role of Regulation at Fintech Software Development”
Дмитро Берднік “Role of Regulation at Fintech Software Development”Dakiry
 
Володимир Довганик “5 typical features that make BA mad”
Володимир Довганик “5 typical features that make BA mad”Володимир Довганик “5 typical features that make BA mad”
Володимир Довганик “5 typical features that make BA mad”Dakiry
 
Станіслав Федоренко “РЕЗУЛЬТАТИВНЫЙ АНАЛИЗ или как вовлечь заказчика”
Станіслав Федоренко “РЕЗУЛЬТАТИВНЫЙ АНАЛИЗ или как вовлечь заказчика”Станіслав Федоренко “РЕЗУЛЬТАТИВНЫЙ АНАЛИЗ или как вовлечь заказчика”
Станіслав Федоренко “РЕЗУЛЬТАТИВНЫЙ АНАЛИЗ или как вовлечь заказчика”Dakiry
 
Роман Сахаров “Кар’єрний розвиток аналітика: стан та перспективи”
Роман Сахаров “Кар’єрний розвиток аналітика: стан та перспективи”Роман Сахаров “Кар’єрний розвиток аналітика: стан та перспективи”
Роман Сахаров “Кар’єрний розвиток аналітика: стан та перспективи”Dakiry
 
Юрій Гайдучок “How to SAFely scale Agile”
Юрій Гайдучок “How to SAFely scale Agile”Юрій Гайдучок “How to SAFely scale Agile”
Юрій Гайдучок “How to SAFely scale Agile”Dakiry
 
Денис Гобов “Бизнес-аналитик в распределенной команде”
Денис Гобов “Бизнес-аналитик в распределенной команде”Денис Гобов “Бизнес-аналитик в распределенной команде”
Денис Гобов “Бизнес-аналитик в распределенной команде”Dakiry
 
Vlad Rybalkin and Artem (Tim) Riaboshapka “Убедить, не переубеждая: воркшоп к...
Vlad Rybalkin and Artem (Tim) Riaboshapka “Убедить, не переубеждая: воркшоп к...Vlad Rybalkin and Artem (Tim) Riaboshapka “Убедить, не переубеждая: воркшоп к...
Vlad Rybalkin and Artem (Tim) Riaboshapka “Убедить, не переубеждая: воркшоп к...Dakiry
 
Антон Вітязь “Успешный запуск продукта – cовместная работа бизнес аналитика, ...
Антон Вітязь “Успешный запуск продукта – cовместная работа бизнес аналитика, ...Антон Вітязь “Успешный запуск продукта – cовместная работа бизнес аналитика, ...
Антон Вітязь “Успешный запуск продукта – cовместная работа бизнес аналитика, ...Dakiry
 

Viewers also liked (20)

Олександр Хотемський “Обзор архитектуры Selenium WebDriver”
Олександр Хотемський “Обзор архитектуры Selenium WebDriver”Олександр Хотемський “Обзор архитектуры Selenium WebDriver”
Олександр Хотемський “Обзор архитектуры Selenium WebDriver”
 
Андрiй Затулло “Трансформация тестировщика или о чем не говорят на курсах”
Андрiй Затулло “Трансформация тестировщика или о чем не говорят на курсах”Андрiй Затулло “Трансформация тестировщика или о чем не говорят на курсах”
Андрiй Затулло “Трансформация тестировщика или о чем не говорят на курсах”
 
Anton Serputko Workshop “Тестування продуктивності”
Anton Serputko Workshop “Тестування продуктивності”Anton Serputko Workshop “Тестування продуктивності”
Anton Serputko Workshop “Тестування продуктивності”
 
Анастасія Васенко “Why don’t you need BDD?”
Анастасія Васенко “Why don’t you need BDD?”Анастасія Васенко “Why don’t you need BDD?”
Анастасія Васенко “Why don’t you need BDD?”
 
Георгій Гульов “Тестування мобільних додатків: з чого починати?”
Георгій Гульов “Тестування мобільних додатків: з чого починати?”Георгій Гульов “Тестування мобільних додатків: з чого починати?”
Георгій Гульов “Тестування мобільних додатків: з чого починати?”
 
Денис Павленко “CRUD&A як ще одна НОВА техніка тест дизайну” (CRUDA – їCreate...
Денис Павленко “CRUD&A як ще одна НОВА техніка тест дизайну” (CRUDA – їCreate...Денис Павленко “CRUD&A як ще одна НОВА техніка тест дизайну” (CRUDA – їCreate...
Денис Павленко “CRUD&A як ще одна НОВА техніка тест дизайну” (CRUDA – їCreate...
 
Ольга Гриник “Make your tester’s life easier with automated deployment. A Rea...
Ольга Гриник “Make your tester’s life easier with automated deployment. A Rea...Ольга Гриник “Make your tester’s life easier with automated deployment. A Rea...
Ольга Гриник “Make your tester’s life easier with automated deployment. A Rea...
 
Dmytro Yermolov “Want better quality ? Rethinking QA and BA interaction”
Dmytro Yermolov “Want better quality ? Rethinking QA and BA interaction”Dmytro Yermolov “Want better quality ? Rethinking QA and BA interaction”
Dmytro Yermolov “Want better quality ? Rethinking QA and BA interaction”
 
Дмитро Горін “Хотите расти в PM’ы? Уверенны?”
Дмитро Горін “Хотите расти в PM’ы? Уверенны?”Дмитро Горін “Хотите расти в PM’ы? Уверенны?”
Дмитро Горін “Хотите расти в PM’ы? Уверенны?”
 
Валентин Будкін “BPMN з людським обличчям”
Валентин Будкін “BPMN з людським обличчям”Валентин Будкін “BPMN з людським обличчям”
Валентин Будкін “BPMN з людським обличчям”
 
Діана Пінчук “How to test mobile SDK and do not loose faith in yourself “
Діана Пінчук “How to test mobile SDK and do not loose faith in yourself “Діана Пінчук “How to test mobile SDK and do not loose faith in yourself “
Діана Пінчук “How to test mobile SDK and do not loose faith in yourself “
 
Людмила Гулик “Организация бизнес-процесса работы с требованиями в продуктово...
Людмила Гулик “Организация бизнес-процесса работы с требованиями в продуктово...Людмила Гулик “Организация бизнес-процесса работы с требованиями в продуктово...
Людмила Гулик “Организация бизнес-процесса работы с требованиями в продуктово...
 
Дмитро Берднік “Role of Regulation at Fintech Software Development”
Дмитро Берднік “Role of Regulation at Fintech Software Development”Дмитро Берднік “Role of Regulation at Fintech Software Development”
Дмитро Берднік “Role of Regulation at Fintech Software Development”
 
Володимир Довганик “5 typical features that make BA mad”
Володимир Довганик “5 typical features that make BA mad”Володимир Довганик “5 typical features that make BA mad”
Володимир Довганик “5 typical features that make BA mad”
 
Станіслав Федоренко “РЕЗУЛЬТАТИВНЫЙ АНАЛИЗ или как вовлечь заказчика”
Станіслав Федоренко “РЕЗУЛЬТАТИВНЫЙ АНАЛИЗ или как вовлечь заказчика”Станіслав Федоренко “РЕЗУЛЬТАТИВНЫЙ АНАЛИЗ или как вовлечь заказчика”
Станіслав Федоренко “РЕЗУЛЬТАТИВНЫЙ АНАЛИЗ или как вовлечь заказчика”
 
Роман Сахаров “Кар’єрний розвиток аналітика: стан та перспективи”
Роман Сахаров “Кар’єрний розвиток аналітика: стан та перспективи”Роман Сахаров “Кар’єрний розвиток аналітика: стан та перспективи”
Роман Сахаров “Кар’єрний розвиток аналітика: стан та перспективи”
 
Юрій Гайдучок “How to SAFely scale Agile”
Юрій Гайдучок “How to SAFely scale Agile”Юрій Гайдучок “How to SAFely scale Agile”
Юрій Гайдучок “How to SAFely scale Agile”
 
Денис Гобов “Бизнес-аналитик в распределенной команде”
Денис Гобов “Бизнес-аналитик в распределенной команде”Денис Гобов “Бизнес-аналитик в распределенной команде”
Денис Гобов “Бизнес-аналитик в распределенной команде”
 
Vlad Rybalkin and Artem (Tim) Riaboshapka “Убедить, не переубеждая: воркшоп к...
Vlad Rybalkin and Artem (Tim) Riaboshapka “Убедить, не переубеждая: воркшоп к...Vlad Rybalkin and Artem (Tim) Riaboshapka “Убедить, не переубеждая: воркшоп к...
Vlad Rybalkin and Artem (Tim) Riaboshapka “Убедить, не переубеждая: воркшоп к...
 
Антон Вітязь “Успешный запуск продукта – cовместная работа бизнес аналитика, ...
Антон Вітязь “Успешный запуск продукта – cовместная работа бизнес аналитика, ...Антон Вітязь “Успешный запуск продукта – cовместная работа бизнес аналитика, ...
Антон Вітязь “Успешный запуск продукта – cовместная работа бизнес аналитика, ...
 

Similar to What is the taste of the Selenide

Web UI test automation instruments
Web UI test automation instrumentsWeb UI test automation instruments
Web UI test automation instrumentsArtem Nagornyi
 
Js Saturday 2013 your jQuery could perform better
Js Saturday 2013 your jQuery could perform betterJs Saturday 2013 your jQuery could perform better
Js Saturday 2013 your jQuery could perform betterIvo Andreev
 
Session on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh GundechaSession on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh GundechaAgile Testing Alliance
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWAREFIWARE
 
Selenium Tutorial for Beginners - TIB Academy
Selenium Tutorial for Beginners - TIB AcademySelenium Tutorial for Beginners - TIB Academy
Selenium Tutorial for Beginners - TIB AcademyTIB Academy
 
Selenium WebDriver with Java
Selenium WebDriver with JavaSelenium WebDriver with Java
Selenium WebDriver with JavaFayis-QA
 
Talk about html5 security
Talk about html5 securityTalk about html5 security
Talk about html5 securityHuang Toby
 
Node.js vs Play Framework (with Japanese subtitles)
Node.js vs Play Framework (with Japanese subtitles)Node.js vs Play Framework (with Japanese subtitles)
Node.js vs Play Framework (with Japanese subtitles)Yevgeniy Brikman
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullySpringPeople
 
Developing your first application using FI-WARE
Developing your first application using FI-WAREDeveloping your first application using FI-WARE
Developing your first application using FI-WAREFermin Galan
 
Get Started With Selenium 3 and Selenium 3 Grid
Get Started With Selenium 3 and Selenium 3 GridGet Started With Selenium 3 and Selenium 3 Grid
Get Started With Selenium 3 and Selenium 3 GridDaniel Herken
 
Selenium testing
Selenium testingSelenium testing
Selenium testingJason Myers
 
HTML5 vs Silverlight
HTML5 vs SilverlightHTML5 vs Silverlight
HTML5 vs SilverlightMatt Casto
 
Simple REST with Dropwizard
Simple REST with DropwizardSimple REST with Dropwizard
Simple REST with DropwizardAndrei Savu
 

Similar to What is the taste of the Selenide (20)

Web UI test automation instruments
Web UI test automation instrumentsWeb UI test automation instruments
Web UI test automation instruments
 
Selenium training
Selenium trainingSelenium training
Selenium training
 
Js Saturday 2013 your jQuery could perform better
Js Saturday 2013 your jQuery could perform betterJs Saturday 2013 your jQuery could perform better
Js Saturday 2013 your jQuery could perform better
 
Selenium web driver
Selenium web driverSelenium web driver
Selenium web driver
 
Session on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh GundechaSession on Selenium Powertools by Unmesh Gundecha
Session on Selenium Powertools by Unmesh Gundecha
 
Selenium
SeleniumSelenium
Selenium
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
 
Selenium Tutorial for Beginners - TIB Academy
Selenium Tutorial for Beginners - TIB AcademySelenium Tutorial for Beginners - TIB Academy
Selenium Tutorial for Beginners - TIB Academy
 
Selenium WebDriver with Java
Selenium WebDriver with JavaSelenium WebDriver with Java
Selenium WebDriver with Java
 
Talk about html5 security
Talk about html5 securityTalk about html5 security
Talk about html5 security
 
Selenium
SeleniumSelenium
Selenium
 
Node.js vs Play Framework (with Japanese subtitles)
Node.js vs Play Framework (with Japanese subtitles)Node.js vs Play Framework (with Japanese subtitles)
Node.js vs Play Framework (with Japanese subtitles)
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium Successfully
 
Developing your first application using FI-WARE
Developing your first application using FI-WAREDeveloping your first application using FI-WARE
Developing your first application using FI-WARE
 
Get Started With Selenium 3 and Selenium 3 Grid
Get Started With Selenium 3 and Selenium 3 GridGet Started With Selenium 3 and Selenium 3 Grid
Get Started With Selenium 3 and Selenium 3 Grid
 
Selenium testing
Selenium testingSelenium testing
Selenium testing
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
HTML5 vs Silverlight
HTML5 vs SilverlightHTML5 vs Silverlight
HTML5 vs Silverlight
 
Jquery Basics
Jquery BasicsJquery Basics
Jquery Basics
 
Simple REST with Dropwizard
Simple REST with DropwizardSimple REST with Dropwizard
Simple REST with Dropwizard
 

Recently uploaded

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 

Recently uploaded (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 

What is the taste of the Selenide

  • 1. What is the taste of the Selenide? MARINSKY ROMA TICKETS.UA
  • 2. Selenium  Selenium is an umbrella project encapsulating a variety of tools and libraries enabling web browser automation  WebDriver, Selenium IDE, Selenium Grid  W3C WebDriver specification
  • 3. Selenium  Need allot of boilerplate for:  Init browsers  Wait for availability of any elements  Screenshots  Logs  Upload and download files  PageObject and PageFactory
  • 4.  Wrapper around Selenium WebDriver not a framework  Fluent API for simple using all features  Supporting AJAX for stable tests, forgot: StaleElementExaptions  Simple waiting for any conditions for each element  Multifunctional Selectors  Simple Configurations for project with tests
  • 6. Selenide.class $(css), $(By by), $x(xpath), $(By, index) $$(css), $$(By by), $$x(xpath) open(…) //URL, Login, PF selectRadio(By, withText) switchTo() page() //for PageFactory *initElements(.class)*
  • 7.
  • 8. Selenide.class  executeJavaScript()  actions()  Wait()  clearAllCookies()  clearLocalStorage()  zoom()  screenshot()
  • 9.
  • 10. SelenideElement actions  followLink(), click(), contextClick()  setValue(string), val(), append()  uploadFile()  selectOption(By, text)  scrollTo(), hover(), dragAndDrop()  getText(), getValue(), getAttribute()
  • 11.
  • 12. Should’ы and Wait’ы  should(Condition condition) shouldHave() shouldBe()  shouldNot(Condition condition) shouldNotHave() shouldNotBe() waitUntil(Condition, timeout, pooling) waitWhile(Condition, timeout, pooling) waitUntil(Condition, timeout) waitWhile(Condition, timeout)
  • 13.
  • 14. ElementCollection actions shouldHaveSize(Condition) get(index), first(), last() filter(Condition), filterBy(Condition) -> collection find(Condition), findBy(Condition) -> element exclude(Condition), excludeBy(Condition)
  • 15.
  • 16. Conditions  visible, appear  exist, present  hidden, disappear  attribute(), attribute(name, value)  value(), name(), type(), id(), cssClass()  empty  matchText(regex), text(), exactText(), textCaseSensitive(), exactTextCaseSensitive()  focused, enabled, disabled,  selected, checked, readOnly  not(Condition), and(because,Condition), or(because, Condition), be(), have()
  • 17.
  • 18. CollectionConditions  get()  size(), sizeGreaterThan(), sizeGreaterThanOrEqual()  sizeLessThan(), sizeLessThanOrEqaul(), sizeNotEqual()  texts(…), exactTexts(…)  empty
  • 19.
  • 20. WebDriverRunner  isFirefox, isHtmlUnit, isChrome, isSafari, isHeadless, isEdge…  source()  url(), currentFrameUrl()  clearBrowserCache()  supportsModalDialogs(), supportsJavascript()  Browser name constants(chrome,ff...)  addListeners(WebDriverEventListener)  setWebDriver(customDriver), closeWebDriver()  getWebDriver(), getAndCheckWebDriver(),  hasWebDriverStarted()  setProxy()
  • 21. Configuration  clickViaJs, fastSetValue  captureJsErrors  screenshots, savePageSource, reportFolder, reportsUrl  dismissModalDialogs  selectorMode [css, sizzle]  assertionMode [soft, strict]  fileDownload [httpget, proxy]  baseUrl, browser  timeout, collectionTimeout  poolingInterval, coollectionPoolingInterval  holdBrowserOpen, reopenBrowserOnFail, closeBrowserMs  remote  browserSize, startMaximized
  • 22. Extra selectors and parent selectors  withText(), byText()  byAttribute(), by()  byTitle(), byValue(), byId(), byName()  byXpath()  byLinkText(), byPartialLinkText()  byCssSelector()  byClassName  $(“tr td.dig”).parent()  $(“tr td.dig”).closest(“th”)
  • 23. Bonus features #1 Configuration.fileDownload = PROXY; File testFile = $(“#file”).download();  Download files via proxy Use when form have no href or other url for start downloading file Download file starts after click on the form. Will starts proxy server witch intercepts downloading files
  • 24. Bonus features #2 You can use: LoginForm loginForm = new LoginForm(); loginForm.submit.click(); Instead of: LoginForm loginForm = page(LoginForm.class); loginForm.submit.click();  Selenide PageFactory You can use: SelenideElement submit = $(“#submit”), loginInput = $(“input.login”); Instead of: @FindBy(css=“#submit”) SelenideElement submit; @FindBy(css=“input.login”) SelenideElement loginInput;
  • 25. Bonus features #3  Simple Logger When you need logging all element actions do not use log4j and others Use: @Rule || @Listener public TextReport = new TextReport(); Or new TextReport().onFailedTest(true) .onSucceededTest(false)
  • 26.
  • 27.
  • 28. Bonus features #4  Screenshots When you need screenshots on each fail test or more Use: @Rule || @Listener public ScreenShooter = ScreenShooter.failedTests(); Or: ScreenShooter.failedTests(). succeededTests();
  • 29.
  • 30. How to start?  Include dependencies: selenide & webdrivermanager  Use static imports for Selenide’s methods  Keep it simple stupid!
  • 32. Myths about Selenide  Will be it enterprise? – No  Selenide will do tests slower! – No  Need to know Selenium at the first! – No  Selenide it isn’t OOP framework! – No  Does not have typed elements! – So what? It’s boilerplate
  • 33. Links & contacts  github.com/rmarinsky  fb.com/newromka  ru.selenide.org  software-testers.herokuapp.com  automated-testing.info/
  • 34. Thank you for attention Questions?