SlideShare uma empresa Scribd logo
1 de 31
Baixar para ler offline
Volodymyr Zdvizhkov
Senior Automation Engineer
3
• Selenium IDE - a Chrome and Firefox add-on that will do
simple record-and-playback of interactions with the
browser. Scripts are recorded in the Selenium-specific
scripting language Selenese
• Selenium-Grid allows you run your tests on different remote
machines against different browsers in parallel. Selenium
Grid is a server that allows tests to use web browser
instances running on remote machines
• Selenium WebDriver - a collection of language specific
bindings to drive a browser- the way it is meant to be driven
4
• Selenide is a framework for writing easy-to-read and easy-
to-maintain automated tests in Java. It defines concise tests
at the same time against different browsers and operating
systems
• Selenoid is a powerful Go implementation of original Selenium hub code
5
• Most common UI automation issues
• Motivation to create new framework
• Selenide features
• Web application to be tested
• Test cases to be covered
• Framework structure
• Pom xml dependencies
• Setting up framework from scratch
Not stable. Flaky tests
6
Reasons of 90%* flaky tests:
• Ajax requests: speed
• Ajax requests: ordering
• JS speed
*= "https://www.youtube.com/watch?v=jLG3RXECQU8”
Need of permanent maintenance
7
• NoSuchElementException - unable to locate element
{"method":"xpath","selector“: “someSelector”}
• StaleElementException - generally this is due to the
DOM being updated and you trying to access an
updated/new element - but the DOM's refreshed so
it's an invalid reference you have.
Automation framework architecture complexity
8
Why always me?
Bad descriptions are easy to write
9
Message: Expected: True But was: False
• Home page should be opened.
• Home page should be opened. Current url: https:://url
• Home page is not visible.
• Home page is not displayed. But should be
• User is not redirected to Home page
10
The most common tool for UI tests in
Java today is Selenium WebDriver.
Selenium WebDriver is a great tool, but
it’s not a tool for testing. It’s a tool for
browser manipulation.
11
Serenity helps you to write cleaner and more maintainable
automated acceptance and regression tests faster. Serenity
also uses the test results to produce illustrated, narrative
reports that document and describe what your application
does and how it works.
12
Cucumber is a software tool used by computer
programmers for testing other software. It runs
automated acceptance tests written in a behavior-
driven development (BDD) style.
13
Galen Framework might be a perfect fit for your
needs if your automation efforts are focused on
user experience design (UX) or layout testing for
responsive websites.
14
How about Selenide?
15
Selenide is a tool for writing concise, expressive and stable UI tests in Java.
16
• Free, open-source
• Makes your tests shorter and more readable
• Ajax support, smart waiting
• Simple configuration
• Automated screenshots
• Pre-setup browser (transparent webDriver)
• Soft assertions
17
The most annoying problem of UI Tests is timeouts
driver.manage().timeouts().implicityWait(10, TimeUnit.SECONDS);
actions
checks
WebDriverWait wait = new WebDriverWait(driver, 10000);
wait.until(ExpectedConditions.presenceOfElementLocated
(By.id("id“));
waitUntil(appear, 20000)
Configuration.timeout = 10000;
Our goal is to emulate user
18
• byText() – find element with given text (the whole text, not substring)
• withText() – find element containing given text (as substring)
Poor software doesn't have documentation. Brilliant software doesn't need documentation
19
Do Action Check
Keep it simple
Transparent WebDriver
20
You don’t need to set up WebDriver logic directly. Selenide will
start and shut down the browser automatically whenever it’s
needed.
Just use:
• open(string url) - The main starting point in your tests.
Open a browser window with given URL
• close() - Close the browser if it's open
Most popular browsers supported: Chrome, Firefox, Ie, Safari,
Opera, etc.
Run browser command: -Dselenide.browser=browserName.
Concise fluent API for tests
21
• shouldHave(textCaseSensitive(String substring));
• dragAndDropTo(String selector);
• sizeLessThanOrEqual(); sizeNotEqual(); sizeGreaterThan();
• atBottom();
• executeJavaScript(String jsCode, Object… arguments);
• doubleClick();
• shouldHave(exactTextCaseSensitive(String text));
• pressEnter(); pressEscape(); pressTab();
Concise fluent API for tests
22
• matchesText() - assert that given element's text matches given regular expression
• empty() - for input element/other element, check that value is missing or empty
• present(); exist(); – returns true if element is present in DOM, otherwise – false
• hidden(); disappear(); not(visible) - checks that element is not visible / not exists
• be(), have() – are used to form human-readable condition
• download(); uploadFile();
• isImage() - returns true if the image is properly loaded
• getSelectedRadio() - returns selected element in radio group
Selenide takes screenshots automatically on every test failure
23
Configure by system property: -Dselenide.screenshots = true;
or programmatically:
above class: @Listeners({ScreenShooter.class}),
inside method/constructor: ScreenShooter.captureSuccessfulTests = true;
By default Selenide puts screenshots to folder: build/reports/tests.
Change directory: Dselenide.reportsFolder = test-result/reports
Additionally, you can take screenshot at any moment with a single
line of code: Screenshot(“my_file_name);
24
Selenide provides point to perform built in verification softly -
this means that Selenide will skip failed verification and collect
all of it and throw error only at the end of test. Available for
TestNG, JUnit4 and Junit5.
All the checks like: $.shouldHave(text("xxx")) will collect
errors and report all them at once. It could be useful if cost of
running tests is too big for you.
Above class: @Listeners({ SoftAsserts.class})
Inside test: Configuration.assertionMode = SOFT;
25
26
Write automation tests for:
27
28
Page objects
Tests
Test steps
Initialize Selenide elements
29
Initialize by elements Return Selenide element in method
30
31

Mais conteúdo relacionado

Mais procurados

Platform Engineering
Platform EngineeringPlatform Engineering
Platform EngineeringOpsta
 
Flutter: Future of App Development
Flutter: Future of App DevelopmentFlutter: Future of App Development
Flutter: Future of App Development9 series
 
Selenium introduction
Selenium introductionSelenium introduction
Selenium introductionPankaj Dubey
 
Selenium WebDriver with C#
Selenium WebDriver with C#Selenium WebDriver with C#
Selenium WebDriver with C#srivinayak
 
Flutter festival gdsc juet guna
Flutter festival   gdsc juet gunaFlutter festival   gdsc juet guna
Flutter festival gdsc juet gunaSachinVerma869778
 
Bienvenido .Net MAUI - la evolución de Xamarin.Forms
Bienvenido .Net MAUI - la evolución de Xamarin.FormsBienvenido .Net MAUI - la evolución de Xamarin.Forms
Bienvenido .Net MAUI - la evolución de Xamarin.FormsVicente Gerardo Guzman Lucio
 
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...Edureka!
 
Getting started with flutter
Getting started with flutterGetting started with flutter
Getting started with flutterrihannakedy
 
Android seminar-presentation
Android seminar-presentationAndroid seminar-presentation
Android seminar-presentationconnectshilpa
 
Monitoring, Logging and Tracing on Kubernetes
Monitoring, Logging and Tracing on KubernetesMonitoring, Logging and Tracing on Kubernetes
Monitoring, Logging and Tracing on KubernetesMartin Etmajer
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriverAnuraj S.L
 
Automated testing using Selenium & NUnit
Automated testing using Selenium & NUnitAutomated testing using Selenium & NUnit
Automated testing using Selenium & NUnitAlfred Jett Grandeza
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using SeleniumNikhil Kapoor
 

Mais procurados (20)

Flutter workshop
Flutter workshopFlutter workshop
Flutter workshop
 
Platform Engineering
Platform EngineeringPlatform Engineering
Platform Engineering
 
Flutter: Future of App Development
Flutter: Future of App DevelopmentFlutter: Future of App Development
Flutter: Future of App Development
 
Selenium introduction
Selenium introductionSelenium introduction
Selenium introduction
 
Android MVVM
Android MVVMAndroid MVVM
Android MVVM
 
Selenium WebDriver with C#
Selenium WebDriver with C#Selenium WebDriver with C#
Selenium WebDriver with C#
 
Flutter festival gdsc juet guna
Flutter festival   gdsc juet gunaFlutter festival   gdsc juet guna
Flutter festival gdsc juet guna
 
Flutter beyond hello world
Flutter beyond hello worldFlutter beyond hello world
Flutter beyond hello world
 
Selenium Demo
Selenium DemoSelenium Demo
Selenium Demo
 
Bienvenido .Net MAUI - la evolución de Xamarin.Forms
Bienvenido .Net MAUI - la evolución de Xamarin.FormsBienvenido .Net MAUI - la evolución de Xamarin.Forms
Bienvenido .Net MAUI - la evolución de Xamarin.Forms
 
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
 
Flutter
FlutterFlutter
Flutter
 
Getting started with flutter
Getting started with flutterGetting started with flutter
Getting started with flutter
 
Android seminar-presentation
Android seminar-presentationAndroid seminar-presentation
Android seminar-presentation
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
Monitoring, Logging and Tracing on Kubernetes
Monitoring, Logging and Tracing on KubernetesMonitoring, Logging and Tracing on Kubernetes
Monitoring, Logging and Tracing on Kubernetes
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriver
 
Automated testing using Selenium & NUnit
Automated testing using Selenium & NUnitAutomated testing using Selenium & NUnit
Automated testing using Selenium & NUnit
 
Selenium Concepts
Selenium ConceptsSelenium Concepts
Selenium Concepts
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
 

Semelhante a Selenide

Automation Testing using Selenium Webdriver
Automation Testing using Selenium WebdriverAutomation Testing using Selenium Webdriver
Automation Testing using Selenium WebdriverPankaj Biswas
 
#2 integration + ui tests
#2 integration + ui tests#2 integration + ui tests
#2 integration + ui testseleksdev
 
Selenium using Java
Selenium using JavaSelenium using Java
Selenium using JavaF K
 
A Simple Guide to Selenium Software Testing
A Simple Guide to Selenium Software TestingA Simple Guide to Selenium Software Testing
A Simple Guide to Selenium Software TestingCalidad Infotech
 
Selenium
SeleniumSelenium
Seleniumeduquer
 
Interview Question & Answers for Selenium Freshers | LearningSlot
Interview Question & Answers for Selenium Freshers | LearningSlotInterview Question & Answers for Selenium Freshers | LearningSlot
Interview Question & Answers for Selenium Freshers | LearningSlotLearning Slot
 
Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium Peyman Fakharian
 
Android Automation Testing with Selendroid
Android Automation Testing with SelendroidAndroid Automation Testing with Selendroid
Android Automation Testing with SelendroidVikas Thange
 

Semelhante a Selenide (20)

Test automation using selenium
Test automation using seleniumTest automation using selenium
Test automation using selenium
 
Automation Testing using Selenium Webdriver
Automation Testing using Selenium WebdriverAutomation Testing using Selenium Webdriver
Automation Testing using Selenium Webdriver
 
Selenium.pptx
Selenium.pptxSelenium.pptx
Selenium.pptx
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
#2 integration + ui tests
#2 integration + ui tests#2 integration + ui tests
#2 integration + ui tests
 
Selenium (1) (1)
Selenium (1) (1)Selenium (1) (1)
Selenium (1) (1)
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium using Java
Selenium using JavaSelenium using Java
Selenium using Java
 
A Simple Guide to Selenium Software Testing
A Simple Guide to Selenium Software TestingA Simple Guide to Selenium Software Testing
A Simple Guide to Selenium Software Testing
 
Selenium
SeleniumSelenium
Selenium
 
Interview Question & Answers for Selenium Freshers | LearningSlot
Interview Question & Answers for Selenium Freshers | LearningSlotInterview Question & Answers for Selenium Freshers | LearningSlot
Interview Question & Answers for Selenium Freshers | LearningSlot
 
Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium
 
Selenium testing - Handle Elements in WebDriver
Selenium testing - Handle Elements in WebDriver Selenium testing - Handle Elements in WebDriver
Selenium testing - Handle Elements in WebDriver
 
Android Automation Testing with Selendroid
Android Automation Testing with SelendroidAndroid Automation Testing with Selendroid
Android Automation Testing with Selendroid
 

Mais de DataArt

DataArt Custom Software Engineering with a Human Approach
DataArt Custom Software Engineering with a Human ApproachDataArt Custom Software Engineering with a Human Approach
DataArt Custom Software Engineering with a Human ApproachDataArt
 
DataArt Healthcare & Life Sciences
DataArt Healthcare & Life SciencesDataArt Healthcare & Life Sciences
DataArt Healthcare & Life SciencesDataArt
 
DataArt Financial Services and Capital Markets
DataArt Financial Services and Capital MarketsDataArt Financial Services and Capital Markets
DataArt Financial Services and Capital MarketsDataArt
 
About DataArt HR Partners
About DataArt HR PartnersAbout DataArt HR Partners
About DataArt HR PartnersDataArt
 
Event management в IT
Event management в ITEvent management в IT
Event management в ITDataArt
 
Digital Marketing from inside
Digital Marketing from insideDigital Marketing from inside
Digital Marketing from insideDataArt
 
What's new in Android, Igor Malytsky ( Google Post I|O Tour)
What's new in Android, Igor Malytsky ( Google Post I|O Tour)What's new in Android, Igor Malytsky ( Google Post I|O Tour)
What's new in Android, Igor Malytsky ( Google Post I|O Tour)DataArt
 
DevOps Workshop:Что бывает, когда DevOps приходит на проект
DevOps Workshop:Что бывает, когда DevOps приходит на проектDevOps Workshop:Что бывает, когда DevOps приходит на проект
DevOps Workshop:Что бывает, когда DevOps приходит на проектDataArt
 
IT Talk Kharkiv: «‎Soft skills в IT. Польза или вред? Максим Бастион, DataArt
IT Talk Kharkiv: «‎Soft skills в IT. Польза или вред? Максим Бастион, DataArtIT Talk Kharkiv: «‎Soft skills в IT. Польза или вред? Максим Бастион, DataArt
IT Talk Kharkiv: «‎Soft skills в IT. Польза или вред? Максим Бастион, DataArtDataArt
 
«Ноль копеек. Спастись от выгорания» — Сергей Чеботарев (Head of Design, Han...
 «Ноль копеек. Спастись от выгорания» — Сергей Чеботарев (Head of Design, Han... «Ноль копеек. Спастись от выгорания» — Сергей Чеботарев (Head of Design, Han...
«Ноль копеек. Спастись от выгорания» — Сергей Чеботарев (Head of Design, Han...DataArt
 
Communication in QA's life
Communication in QA's lifeCommunication in QA's life
Communication in QA's lifeDataArt
 
Нельзя просто так взять и договориться, или как мы работали со сложными людьми
Нельзя просто так взять и договориться, или как мы работали со сложными людьмиНельзя просто так взять и договориться, или как мы работали со сложными людьми
Нельзя просто так взять и договориться, или как мы работали со сложными людьмиDataArt
 
Знакомьтесь, DevOps
Знакомьтесь, DevOpsЗнакомьтесь, DevOps
Знакомьтесь, DevOpsDataArt
 
DevOps in real life
DevOps in real lifeDevOps in real life
DevOps in real lifeDataArt
 
Codeless: автоматизация тестирования
Codeless: автоматизация тестированияCodeless: автоматизация тестирования
Codeless: автоматизация тестированияDataArt
 
A. Sirota "Building an Automation Solution based on Appium"
A. Sirota "Building an Automation Solution based on Appium"A. Sirota "Building an Automation Solution based on Appium"
A. Sirota "Building an Automation Solution based on Appium"DataArt
 
Эмоциональный интеллект или как не сойти с ума в условиях сложного и динамичн...
Эмоциональный интеллект или как не сойти с ума в условиях сложного и динамичн...Эмоциональный интеллект или как не сойти с ума в условиях сложного и динамичн...
Эмоциональный интеллект или как не сойти с ума в условиях сложного и динамичн...DataArt
 
IT talk: Как я перестал бояться и полюбил TestNG
IT talk: Как я перестал бояться и полюбил TestNGIT talk: Как я перестал бояться и полюбил TestNG
IT talk: Как я перестал бояться и полюбил TestNGDataArt
 
Olga Dzeverina pm_day_pdf
Olga Dzeverina pm_day_pdfOlga Dzeverina pm_day_pdf
Olga Dzeverina pm_day_pdfDataArt
 
Разработка cloud-native Java-приложений для Kubernetes, Егор Волков,Senior Ja...
Разработка cloud-native Java-приложений для Kubernetes, Егор Волков,Senior Ja...Разработка cloud-native Java-приложений для Kubernetes, Егор Волков,Senior Ja...
Разработка cloud-native Java-приложений для Kubernetes, Егор Волков,Senior Ja...DataArt
 

Mais de DataArt (20)

DataArt Custom Software Engineering with a Human Approach
DataArt Custom Software Engineering with a Human ApproachDataArt Custom Software Engineering with a Human Approach
DataArt Custom Software Engineering with a Human Approach
 
DataArt Healthcare & Life Sciences
DataArt Healthcare & Life SciencesDataArt Healthcare & Life Sciences
DataArt Healthcare & Life Sciences
 
DataArt Financial Services and Capital Markets
DataArt Financial Services and Capital MarketsDataArt Financial Services and Capital Markets
DataArt Financial Services and Capital Markets
 
About DataArt HR Partners
About DataArt HR PartnersAbout DataArt HR Partners
About DataArt HR Partners
 
Event management в IT
Event management в ITEvent management в IT
Event management в IT
 
Digital Marketing from inside
Digital Marketing from insideDigital Marketing from inside
Digital Marketing from inside
 
What's new in Android, Igor Malytsky ( Google Post I|O Tour)
What's new in Android, Igor Malytsky ( Google Post I|O Tour)What's new in Android, Igor Malytsky ( Google Post I|O Tour)
What's new in Android, Igor Malytsky ( Google Post I|O Tour)
 
DevOps Workshop:Что бывает, когда DevOps приходит на проект
DevOps Workshop:Что бывает, когда DevOps приходит на проектDevOps Workshop:Что бывает, когда DevOps приходит на проект
DevOps Workshop:Что бывает, когда DevOps приходит на проект
 
IT Talk Kharkiv: «‎Soft skills в IT. Польза или вред? Максим Бастион, DataArt
IT Talk Kharkiv: «‎Soft skills в IT. Польза или вред? Максим Бастион, DataArtIT Talk Kharkiv: «‎Soft skills в IT. Польза или вред? Максим Бастион, DataArt
IT Talk Kharkiv: «‎Soft skills в IT. Польза или вред? Максим Бастион, DataArt
 
«Ноль копеек. Спастись от выгорания» — Сергей Чеботарев (Head of Design, Han...
 «Ноль копеек. Спастись от выгорания» — Сергей Чеботарев (Head of Design, Han... «Ноль копеек. Спастись от выгорания» — Сергей Чеботарев (Head of Design, Han...
«Ноль копеек. Спастись от выгорания» — Сергей Чеботарев (Head of Design, Han...
 
Communication in QA's life
Communication in QA's lifeCommunication in QA's life
Communication in QA's life
 
Нельзя просто так взять и договориться, или как мы работали со сложными людьми
Нельзя просто так взять и договориться, или как мы работали со сложными людьмиНельзя просто так взять и договориться, или как мы работали со сложными людьми
Нельзя просто так взять и договориться, или как мы работали со сложными людьми
 
Знакомьтесь, DevOps
Знакомьтесь, DevOpsЗнакомьтесь, DevOps
Знакомьтесь, DevOps
 
DevOps in real life
DevOps in real lifeDevOps in real life
DevOps in real life
 
Codeless: автоматизация тестирования
Codeless: автоматизация тестированияCodeless: автоматизация тестирования
Codeless: автоматизация тестирования
 
A. Sirota "Building an Automation Solution based on Appium"
A. Sirota "Building an Automation Solution based on Appium"A. Sirota "Building an Automation Solution based on Appium"
A. Sirota "Building an Automation Solution based on Appium"
 
Эмоциональный интеллект или как не сойти с ума в условиях сложного и динамичн...
Эмоциональный интеллект или как не сойти с ума в условиях сложного и динамичн...Эмоциональный интеллект или как не сойти с ума в условиях сложного и динамичн...
Эмоциональный интеллект или как не сойти с ума в условиях сложного и динамичн...
 
IT talk: Как я перестал бояться и полюбил TestNG
IT talk: Как я перестал бояться и полюбил TestNGIT talk: Как я перестал бояться и полюбил TestNG
IT talk: Как я перестал бояться и полюбил TestNG
 
Olga Dzeverina pm_day_pdf
Olga Dzeverina pm_day_pdfOlga Dzeverina pm_day_pdf
Olga Dzeverina pm_day_pdf
 
Разработка cloud-native Java-приложений для Kubernetes, Егор Волков,Senior Ja...
Разработка cloud-native Java-приложений для Kubernetes, Егор Волков,Senior Ja...Разработка cloud-native Java-приложений для Kubernetes, Егор Волков,Senior Ja...
Разработка cloud-native Java-приложений для Kubernetes, Егор Волков,Senior Ja...
 

Último

Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsPooky Knightsmith
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptxJonalynLegaspi2
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17Celine George
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 

Último (20)

Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young minds
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 

Selenide

  • 1.
  • 3. 3 • Selenium IDE - a Chrome and Firefox add-on that will do simple record-and-playback of interactions with the browser. Scripts are recorded in the Selenium-specific scripting language Selenese • Selenium-Grid allows you run your tests on different remote machines against different browsers in parallel. Selenium Grid is a server that allows tests to use web browser instances running on remote machines • Selenium WebDriver - a collection of language specific bindings to drive a browser- the way it is meant to be driven
  • 4. 4 • Selenide is a framework for writing easy-to-read and easy- to-maintain automated tests in Java. It defines concise tests at the same time against different browsers and operating systems • Selenoid is a powerful Go implementation of original Selenium hub code
  • 5. 5 • Most common UI automation issues • Motivation to create new framework • Selenide features • Web application to be tested • Test cases to be covered • Framework structure • Pom xml dependencies • Setting up framework from scratch
  • 6. Not stable. Flaky tests 6 Reasons of 90%* flaky tests: • Ajax requests: speed • Ajax requests: ordering • JS speed *= "https://www.youtube.com/watch?v=jLG3RXECQU8”
  • 7. Need of permanent maintenance 7 • NoSuchElementException - unable to locate element {"method":"xpath","selector“: “someSelector”} • StaleElementException - generally this is due to the DOM being updated and you trying to access an updated/new element - but the DOM's refreshed so it's an invalid reference you have.
  • 8. Automation framework architecture complexity 8 Why always me?
  • 9. Bad descriptions are easy to write 9 Message: Expected: True But was: False • Home page should be opened. • Home page should be opened. Current url: https:://url • Home page is not visible. • Home page is not displayed. But should be • User is not redirected to Home page
  • 10. 10 The most common tool for UI tests in Java today is Selenium WebDriver. Selenium WebDriver is a great tool, but it’s not a tool for testing. It’s a tool for browser manipulation.
  • 11. 11 Serenity helps you to write cleaner and more maintainable automated acceptance and regression tests faster. Serenity also uses the test results to produce illustrated, narrative reports that document and describe what your application does and how it works.
  • 12. 12 Cucumber is a software tool used by computer programmers for testing other software. It runs automated acceptance tests written in a behavior- driven development (BDD) style.
  • 13. 13 Galen Framework might be a perfect fit for your needs if your automation efforts are focused on user experience design (UX) or layout testing for responsive websites.
  • 15. 15 Selenide is a tool for writing concise, expressive and stable UI tests in Java.
  • 16. 16 • Free, open-source • Makes your tests shorter and more readable • Ajax support, smart waiting • Simple configuration • Automated screenshots • Pre-setup browser (transparent webDriver) • Soft assertions
  • 17. 17 The most annoying problem of UI Tests is timeouts driver.manage().timeouts().implicityWait(10, TimeUnit.SECONDS); actions checks WebDriverWait wait = new WebDriverWait(driver, 10000); wait.until(ExpectedConditions.presenceOfElementLocated (By.id("id“)); waitUntil(appear, 20000) Configuration.timeout = 10000;
  • 18. Our goal is to emulate user 18 • byText() – find element with given text (the whole text, not substring) • withText() – find element containing given text (as substring)
  • 19. Poor software doesn't have documentation. Brilliant software doesn't need documentation 19 Do Action Check Keep it simple
  • 20. Transparent WebDriver 20 You don’t need to set up WebDriver logic directly. Selenide will start and shut down the browser automatically whenever it’s needed. Just use: • open(string url) - The main starting point in your tests. Open a browser window with given URL • close() - Close the browser if it's open Most popular browsers supported: Chrome, Firefox, Ie, Safari, Opera, etc. Run browser command: -Dselenide.browser=browserName.
  • 21. Concise fluent API for tests 21 • shouldHave(textCaseSensitive(String substring)); • dragAndDropTo(String selector); • sizeLessThanOrEqual(); sizeNotEqual(); sizeGreaterThan(); • atBottom(); • executeJavaScript(String jsCode, Object… arguments); • doubleClick(); • shouldHave(exactTextCaseSensitive(String text)); • pressEnter(); pressEscape(); pressTab();
  • 22. Concise fluent API for tests 22 • matchesText() - assert that given element's text matches given regular expression • empty() - for input element/other element, check that value is missing or empty • present(); exist(); – returns true if element is present in DOM, otherwise – false • hidden(); disappear(); not(visible) - checks that element is not visible / not exists • be(), have() – are used to form human-readable condition • download(); uploadFile(); • isImage() - returns true if the image is properly loaded • getSelectedRadio() - returns selected element in radio group
  • 23. Selenide takes screenshots automatically on every test failure 23 Configure by system property: -Dselenide.screenshots = true; or programmatically: above class: @Listeners({ScreenShooter.class}), inside method/constructor: ScreenShooter.captureSuccessfulTests = true; By default Selenide puts screenshots to folder: build/reports/tests. Change directory: Dselenide.reportsFolder = test-result/reports Additionally, you can take screenshot at any moment with a single line of code: Screenshot(“my_file_name);
  • 24. 24 Selenide provides point to perform built in verification softly - this means that Selenide will skip failed verification and collect all of it and throw error only at the end of test. Available for TestNG, JUnit4 and Junit5. All the checks like: $.shouldHave(text("xxx")) will collect errors and report all them at once. It could be useful if cost of running tests is too big for you. Above class: @Listeners({ SoftAsserts.class}) Inside test: Configuration.assertionMode = SOFT;
  • 25. 25
  • 26. 26
  • 30. Initialize by elements Return Selenide element in method 30
  • 31. 31