SlideShare a Scribd company logo
Test Automation
Puzzlers
WAT?
Ciklum
https://www.facebook.com/yaroslav.pernerovsky
Sergey
Pirogov
Yaroslav
Pernerovsky
https://www.facebook.com/spirogov
GlobalLogic
driver.get("google.com");
What will selenium do?
A: Open google.com B: Sent GET request
C: NullPointerException D: WebDriverException
org.openqa.selenium.WebDriverException: unknown
error: unhandled inspector error: {"code":-32000,
"message":"Cannot navigate to invalid URL"}
(Session info: chrome=60.0.3112.113)
(Driver info: chromedriver=2.32.498550
(9dec58e66c31bcc53a9ce3c7226f0c1c5810906a),platfo
rm=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The
server did not provide any stacktrace
information)
Command duration or timeout: 0 milliseconds
...
People says that Selenide is better
What will selenide do?
A: Open google.com B: Wait four seconds
C: NullPointerException D: WebDriverException
selenide.open("google.com");
Exception in thread "main"
org.openqa.selenium.WebDriverException: unknown error: unhandled
inspector error: {"code":-32000,"message":"Cannot navigate to
invalid URL"}
(Session info: chrome=61.0.3163.91)
(Driver info: chromedriver=2.32.498513
(2c63aa53b2c658de596ed550eb5267ec5967b351),platform=Linux 4.10.0-
35-generic x86_64) (WARNING: The server did not provide any
stacktrace information)
Command duration or timeout: 14 milliseconds
Build info: version: '3.4.0', revision: 'unknown', time:
'unknown'
System info: host: 'sergey-asus', ip: '127.0.1.1', os.name:
'Linux', os.arch: 'amd64', os.version: '4.10.0-35-generic',
java.version: '1.8.0_144'
Driver info: org.openqa.selenium.chrome.ChromeDriver
selenide.url: http://localhost:8080google.com
What will happen?
A: Set value to 1 B: NoSuchOptionException
C: NullPointerException D: InvalidElementStateException
<select id=”listBox”>
<option value=’2’>1</option>
</select>
$("#listBox").setValue("1");
Exception in thread "main"
org.openqa.selenium.InvalidElementStateException: invalid element
state: Element must be user-editable in order to clear it.
(Session info: chrome=60.0.3112.113)
(Driver info: chromedriver=2.32.498537
(cb2f855cbc7b82e20387eaf9a43f6b99b6105061),platform=Mac OS X
10.12.6 x86_64) (WARNING: The server did not provide any
stacktrace information)
Command duration or timeout: 8 milliseconds
What will be printed in console?
B: Element page lost
C: Nothing D: WrongLocatorException
try{
$("element").waitUntil(appear, 3000);}
catch(NoSuchElementException ex){
Assert.fail("Element page lost");}
A: NoSuchElementException
Exception in thread "main" Element not found {#bad}
Expected: visible
Screenshot:
file:/home/sergey/Github/demo/build/reports/tests/1505985705319.0
.png
Timeout: 3.500 s.
Caused by: NoSuchElementException: no such element: Unable to
locate element: {"method":"css selector","selector":"#bad"}
try{
$(“element”).waitUntil(appear, 3000);
}catch(UIAssertionError ex){
Assert.fail(“Element page lost”);
}
Which text you got?
A: “Text with spaces” B: “Text with spaces”
C: Depends on browser D: “h1”
<h1>
Text with spaces
</h1>
findElement(By.tagName("h1")).getText();
element.getAttribute("textContent");
driver.manage().timeouts()
.implicitlyWait(10,TimeUnit.SECONDS);
wait = new WebDriverWait(driver,5);
wait.until(ExpectedConditions
.presenceOfElementLocated(locator));
How long will Selenium wait?
A: 5 B: 15
C: 10 D: 0
Implicit Wait hereExplicit Wait here
Which exception will be thrown?
B: None
C: NoSuchElement D: Both
A: Timeout
driver.manage().timeouts()
.implicitlyWait(10,TimeUnit.SECONDS);
wait = new WebDriverWait(driver,5);
wait.until(ExpectedConditions
.presenceOfElementLocated(locator));
Which is faster?
A: By.id B:By.Xpath
C: They are equal D: By.css
driver.findElement(By.id("someId"));
driver.findElement(By.cssSelector("#someId"));
static id(id) {
return By.css('*[id="'+ escapeCss(id) +'"]');
}
public WebElement findElement(SearchContext context) {
if (context instanceof FindsById)
return ((FindsById) context).findElementById(id);
return ((FindsByXPath)context)
.findElementByXPath(".//*[@id = '" + id + "']");
}
How long will we wait here?
A: 7 B: 12
C: 4 D: 3
driver.manage()
.timeouts().implicitlyWait(3,SECONDS);
$("wrongId");
driver.findElement(By.id("wrongId"));
What will happen?
A: Test will pass B: Assert fail
C:NullPointerException D: NoSuchElement
class Page{ WebElement header; }
driver.get(“http://google.com”);
Page p = initElements(driver,Page.class);
Assert(p.header.text() == “Google”);
INFO: Detected dialect: OSSException in thread
"main"
org.openqa.selenium.NoSuchElementException: no
such element: Unable to locate element:
{"method":"name","selector":"header"} (Session
info: chrome=60.0.3112.113) (Driver info:
chromedriver=2.32.498537
(cb2f855cbc7b82e20387eaf9a43f6b99b6105061),platf
orm=Mac OS X 10.12.6 x86_64)
...
What will happen?
A: HateJSException B: WebDriverException
C: Print Text D: Object
console.log($('div').getText());
$(‘div’).getText()
.then(function(text) { console.log(text); })
Thank you!
https://www.facebook.com/yaroslav.pernerovskyhttps://www.facebook.com/spirogov

More Related Content

What's hot

Cross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineCross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App Engine
Andy McKay
 
Infinum Android Talks #16 - Retrofit 2 by Kristijan Jurkovic
Infinum Android Talks #16 - Retrofit 2 by Kristijan JurkovicInfinum Android Talks #16 - Retrofit 2 by Kristijan Jurkovic
Infinum Android Talks #16 - Retrofit 2 by Kristijan Jurkovic
Infinum
 
10 Excellent Ways to Secure Your Spring Boot Application - Devoxx Morocco 2019
10 Excellent Ways to Secure Your Spring Boot Application - Devoxx Morocco 201910 Excellent Ways to Secure Your Spring Boot Application - Devoxx Morocco 2019
10 Excellent Ways to Secure Your Spring Boot Application - Devoxx Morocco 2019
Matt Raible
 
Metrics-Driven Engineering at Etsy
Metrics-Driven Engineering at EtsyMetrics-Driven Engineering at Etsy
Metrics-Driven Engineering at EtsyMike Brittain
 
To Err Is Human
To Err Is HumanTo Err Is Human
To Err Is Human
Alex Liu
 
The Screenplay Pattern: Better Interactions for Better Automation
The Screenplay Pattern: Better Interactions for Better AutomationThe Screenplay Pattern: Better Interactions for Better Automation
The Screenplay Pattern: Better Interactions for Better Automation
Applitools
 
Correcting Common .NET Async/Await Mistakes
Correcting Common .NET Async/Await MistakesCorrecting Common .NET Async/Await Mistakes
Correcting Common .NET Async/Await Mistakes
Brandon Minnick, MBA
 
Coolblue - Behind the Scenes Continuous Integration & Deployment
Coolblue - Behind the Scenes Continuous Integration & DeploymentCoolblue - Behind the Scenes Continuous Integration & Deployment
Coolblue - Behind the Scenes Continuous Integration & Deployment
Matthew Hodgkins
 
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
 
Multi Client Development with Spring - Josh Long
Multi Client Development with Spring - Josh Long Multi Client Development with Spring - Josh Long
Multi Client Development with Spring - Josh Long
jaxconf
 
Learning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security APILearning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security API
caswenson
 
Callbacks, promises, generators - asynchronous javascript
Callbacks, promises, generators - asynchronous javascriptCallbacks, promises, generators - asynchronous javascript
Callbacks, promises, generators - asynchronous javascript
Łukasz Kużyński
 
10 Excellent Ways to Secure Your Spring Boot Application - Devoxx Belgium 2019
10 Excellent Ways to Secure Your Spring Boot Application - Devoxx Belgium 201910 Excellent Ways to Secure Your Spring Boot Application - Devoxx Belgium 2019
10 Excellent Ways to Secure Your Spring Boot Application - Devoxx Belgium 2019
Matt Raible
 
Selenium Sandwich Part 1: Data driven Selenium
Selenium Sandwich Part 1: Data driven Selenium Selenium Sandwich Part 1: Data driven Selenium
Selenium Sandwich Part 1: Data driven Selenium
Workhorse Computing
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSPat Cito
 
Your code are my tests
Your code are my testsYour code are my tests
Your code are my tests
Michelangelo van Dam
 
I hate mocking
I hate mockingI hate mocking
I hate mocking
Steve Loughran
 
2011/1/27 Amazon Route53 使ってみた@第1回クラウド女子会
2011/1/27 Amazon Route53 使ってみた@第1回クラウド女子会2011/1/27 Amazon Route53 使ってみた@第1回クラウド女子会
2011/1/27 Amazon Route53 使ってみた@第1回クラウド女子会
Miki Takata
 
The Promised Land (in Angular)
The Promised Land (in Angular)The Promised Land (in Angular)
The Promised Land (in Angular)
Domenic Denicola
 

What's hot (20)

Cross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineCross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App Engine
 
Infinum Android Talks #16 - Retrofit 2 by Kristijan Jurkovic
Infinum Android Talks #16 - Retrofit 2 by Kristijan JurkovicInfinum Android Talks #16 - Retrofit 2 by Kristijan Jurkovic
Infinum Android Talks #16 - Retrofit 2 by Kristijan Jurkovic
 
10 Excellent Ways to Secure Your Spring Boot Application - Devoxx Morocco 2019
10 Excellent Ways to Secure Your Spring Boot Application - Devoxx Morocco 201910 Excellent Ways to Secure Your Spring Boot Application - Devoxx Morocco 2019
10 Excellent Ways to Secure Your Spring Boot Application - Devoxx Morocco 2019
 
Metrics-Driven Engineering at Etsy
Metrics-Driven Engineering at EtsyMetrics-Driven Engineering at Etsy
Metrics-Driven Engineering at Etsy
 
To Err Is Human
To Err Is HumanTo Err Is Human
To Err Is Human
 
The Screenplay Pattern: Better Interactions for Better Automation
The Screenplay Pattern: Better Interactions for Better AutomationThe Screenplay Pattern: Better Interactions for Better Automation
The Screenplay Pattern: Better Interactions for Better Automation
 
Correcting Common .NET Async/Await Mistakes
Correcting Common .NET Async/Await MistakesCorrecting Common .NET Async/Await Mistakes
Correcting Common .NET Async/Await Mistakes
 
Coolblue - Behind the Scenes Continuous Integration & Deployment
Coolblue - Behind the Scenes Continuous Integration & DeploymentCoolblue - Behind the Scenes Continuous Integration & Deployment
Coolblue - Behind the Scenes Continuous Integration & Deployment
 
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
 
Multi Client Development with Spring - Josh Long
Multi Client Development with Spring - Josh Long Multi Client Development with Spring - Josh Long
Multi Client Development with Spring - Josh Long
 
Real
RealReal
Real
 
Learning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security APILearning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security API
 
Callbacks, promises, generators - asynchronous javascript
Callbacks, promises, generators - asynchronous javascriptCallbacks, promises, generators - asynchronous javascript
Callbacks, promises, generators - asynchronous javascript
 
10 Excellent Ways to Secure Your Spring Boot Application - Devoxx Belgium 2019
10 Excellent Ways to Secure Your Spring Boot Application - Devoxx Belgium 201910 Excellent Ways to Secure Your Spring Boot Application - Devoxx Belgium 2019
10 Excellent Ways to Secure Your Spring Boot Application - Devoxx Belgium 2019
 
Selenium Sandwich Part 1: Data driven Selenium
Selenium Sandwich Part 1: Data driven Selenium Selenium Sandwich Part 1: Data driven Selenium
Selenium Sandwich Part 1: Data driven Selenium
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Your code are my tests
Your code are my testsYour code are my tests
Your code are my tests
 
I hate mocking
I hate mockingI hate mocking
I hate mocking
 
2011/1/27 Amazon Route53 使ってみた@第1回クラウド女子会
2011/1/27 Amazon Route53 使ってみた@第1回クラウド女子会2011/1/27 Amazon Route53 使ってみた@第1回クラウド女子会
2011/1/27 Amazon Route53 使ってみた@第1回クラウド女子会
 
The Promised Land (in Angular)
The Promised Land (in Angular)The Promised Land (in Angular)
The Promised Land (in Angular)
 

Viewers also liked

QA Club Kiev #19 - ISTQB to be or not to be
QA Club Kiev #19 - ISTQB to be or not to beQA Club Kiev #19 - ISTQB to be or not to be
QA Club Kiev #19 - ISTQB to be or not to be
QA Club Kiev
 
QA Fest 2017. Игорь Хрол. Кто должен писать автоматические тесты?
QA Fest 2017. Игорь Хрол. Кто должен писать автоматические тесты?QA Fest 2017. Игорь Хрол. Кто должен писать автоматические тесты?
QA Fest 2017. Игорь Хрол. Кто должен писать автоматические тесты?
QAFest
 
QA Fest 2017. Иван Пашко. Антипаттерны и запахи в автоматизации тестирования
QA Fest 2017. Иван Пашко. Антипаттерны и запахи в автоматизации тестированияQA Fest 2017. Иван Пашко. Антипаттерны и запахи в автоматизации тестирования
QA Fest 2017. Иван Пашко. Антипаттерны и запахи в автоматизации тестирования
QAFest
 
QA Fest 2017. Mark Winteringham. The automated acceptance testing paradox
QA Fest 2017. Mark Winteringham. The automated acceptance testing paradoxQA Fest 2017. Mark Winteringham. The automated acceptance testing paradox
QA Fest 2017. Mark Winteringham. The automated acceptance testing paradox
QAFest
 
QA Fest 2017. Денис Жевнер. Вы думали ваши секреты в безопасности? Вы ошибались
QA Fest 2017. Денис Жевнер. Вы думали ваши секреты в безопасности? Вы ошибалисьQA Fest 2017. Денис Жевнер. Вы думали ваши секреты в безопасности? Вы ошибались
QA Fest 2017. Денис Жевнер. Вы думали ваши секреты в безопасности? Вы ошибались
QAFest
 
QA Fest 2017. Никита Галкин. Контрактное тестирование на примерах или Contrac...
QA Fest 2017. Никита Галкин. Контрактное тестирование на примерах или Contrac...QA Fest 2017. Никита Галкин. Контрактное тестирование на примерах или Contrac...
QA Fest 2017. Никита Галкин. Контрактное тестирование на примерах или Contrac...
QAFest
 

Viewers also liked (6)

QA Club Kiev #19 - ISTQB to be or not to be
QA Club Kiev #19 - ISTQB to be or not to beQA Club Kiev #19 - ISTQB to be or not to be
QA Club Kiev #19 - ISTQB to be or not to be
 
QA Fest 2017. Игорь Хрол. Кто должен писать автоматические тесты?
QA Fest 2017. Игорь Хрол. Кто должен писать автоматические тесты?QA Fest 2017. Игорь Хрол. Кто должен писать автоматические тесты?
QA Fest 2017. Игорь Хрол. Кто должен писать автоматические тесты?
 
QA Fest 2017. Иван Пашко. Антипаттерны и запахи в автоматизации тестирования
QA Fest 2017. Иван Пашко. Антипаттерны и запахи в автоматизации тестированияQA Fest 2017. Иван Пашко. Антипаттерны и запахи в автоматизации тестирования
QA Fest 2017. Иван Пашко. Антипаттерны и запахи в автоматизации тестирования
 
QA Fest 2017. Mark Winteringham. The automated acceptance testing paradox
QA Fest 2017. Mark Winteringham. The automated acceptance testing paradoxQA Fest 2017. Mark Winteringham. The automated acceptance testing paradox
QA Fest 2017. Mark Winteringham. The automated acceptance testing paradox
 
QA Fest 2017. Денис Жевнер. Вы думали ваши секреты в безопасности? Вы ошибались
QA Fest 2017. Денис Жевнер. Вы думали ваши секреты в безопасности? Вы ошибалисьQA Fest 2017. Денис Жевнер. Вы думали ваши секреты в безопасности? Вы ошибались
QA Fest 2017. Денис Жевнер. Вы думали ваши секреты в безопасности? Вы ошибались
 
QA Fest 2017. Никита Галкин. Контрактное тестирование на примерах или Contrac...
QA Fest 2017. Никита Галкин. Контрактное тестирование на примерах или Contrac...QA Fest 2017. Никита Галкин. Контрактное тестирование на примерах или Contrac...
QA Fest 2017. Никита Галкин. Контрактное тестирование на примерах или Contrac...
 

Similar to Automation puzzlers

State of the resource timing api
State of the resource timing apiState of the resource timing api
State of the resource timing api
Aaron Peters
 
KISS Automation.py
KISS Automation.pyKISS Automation.py
KISS Automation.py
Iakiv Kramarenko
 
Spicy javascript: Create your first Chrome extension for web analytics QA
Spicy javascript: Create your first Chrome extension for web analytics QASpicy javascript: Create your first Chrome extension for web analytics QA
Spicy javascript: Create your first Chrome extension for web analytics QA
Alban Gérôme
 
Updates since :has() was enabled in Chrome
Updates since :has() was enabled in ChromeUpdates since :has() was enabled in Chrome
Updates since :has() was enabled in Chrome
Igalia
 
Chromium Embedded Framework + Go at Brooklyn JS
Chromium Embedded Framework + Go at Brooklyn JSChromium Embedded Framework + Go at Brooklyn JS
Chromium Embedded Framework + Go at Brooklyn JS
quirkey
 
Testing at Both Ends of the Triangle
Testing at Both Ends of the TriangleTesting at Both Ends of the Triangle
Testing at Both Ends of the Triangle
Derek Graham
 
Going Offline with Gears And GWT
Going Offline with Gears And GWTGoing Offline with Gears And GWT
Going Offline with Gears And GWT
tom.peck
 
Detecting headless browsers
Detecting headless browsersDetecting headless browsers
Detecting headless browsers
Sergey Shekyan
 
Web UI test automation instruments
Web UI test automation instrumentsWeb UI test automation instruments
Web UI test automation instruments
Artem Nagornyi
 
Naive application development
Naive application developmentNaive application development
Naive application development
Shaka Huang
 
Testing ASP.NET - Progressive.NET
Testing ASP.NET - Progressive.NETTesting ASP.NET - Progressive.NET
Testing ASP.NET - Progressive.NET
Ben Hall
 
Gems Of Selenium
Gems Of SeleniumGems Of Selenium
Gems Of Selenium
Skills Matter
 
Frameworkless Web Development in Clojure
Frameworkless Web Development in ClojureFrameworkless Web Development in Clojure
Frameworkless Web Development in Clojure
Kungi2342
 
The Big Picture and How to Get Started
The Big Picture and How to Get StartedThe Big Picture and How to Get Started
The Big Picture and How to Get Started
guest1af57e
 
Drive chrome(headless) with puppeteer
Drive chrome(headless) with puppeteerDrive chrome(headless) with puppeteer
Drive chrome(headless) with puppeteer
VodqaBLR
 
10 Excellent Ways to Secure Spring Boot Applications - Okta Webinar 2020
10 Excellent Ways to Secure Spring Boot Applications - Okta Webinar 202010 Excellent Ways to Secure Spring Boot Applications - Okta Webinar 2020
10 Excellent Ways to Secure Spring Boot Applications - Okta Webinar 2020
Matt Raible
 
Night Watch with QA
Night Watch with QANight Watch with QA
Night Watch with QA
Carsten Sandtner
 
High Performance Snippets
High Performance SnippetsHigh Performance Snippets
High Performance Snippets
Steve Souders
 
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analystsMeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
Simo Ahava
 

Similar to Automation puzzlers (20)

huhu
huhuhuhu
huhu
 
State of the resource timing api
State of the resource timing apiState of the resource timing api
State of the resource timing api
 
KISS Automation.py
KISS Automation.pyKISS Automation.py
KISS Automation.py
 
Spicy javascript: Create your first Chrome extension for web analytics QA
Spicy javascript: Create your first Chrome extension for web analytics QASpicy javascript: Create your first Chrome extension for web analytics QA
Spicy javascript: Create your first Chrome extension for web analytics QA
 
Updates since :has() was enabled in Chrome
Updates since :has() was enabled in ChromeUpdates since :has() was enabled in Chrome
Updates since :has() was enabled in Chrome
 
Chromium Embedded Framework + Go at Brooklyn JS
Chromium Embedded Framework + Go at Brooklyn JSChromium Embedded Framework + Go at Brooklyn JS
Chromium Embedded Framework + Go at Brooklyn JS
 
Testing at Both Ends of the Triangle
Testing at Both Ends of the TriangleTesting at Both Ends of the Triangle
Testing at Both Ends of the Triangle
 
Going Offline with Gears And GWT
Going Offline with Gears And GWTGoing Offline with Gears And GWT
Going Offline with Gears And GWT
 
Detecting headless browsers
Detecting headless browsersDetecting headless browsers
Detecting headless browsers
 
Web UI test automation instruments
Web UI test automation instrumentsWeb UI test automation instruments
Web UI test automation instruments
 
Naive application development
Naive application developmentNaive application development
Naive application development
 
Testing ASP.NET - Progressive.NET
Testing ASP.NET - Progressive.NETTesting ASP.NET - Progressive.NET
Testing ASP.NET - Progressive.NET
 
Gems Of Selenium
Gems Of SeleniumGems Of Selenium
Gems Of Selenium
 
Frameworkless Web Development in Clojure
Frameworkless Web Development in ClojureFrameworkless Web Development in Clojure
Frameworkless Web Development in Clojure
 
The Big Picture and How to Get Started
The Big Picture and How to Get StartedThe Big Picture and How to Get Started
The Big Picture and How to Get Started
 
Drive chrome(headless) with puppeteer
Drive chrome(headless) with puppeteerDrive chrome(headless) with puppeteer
Drive chrome(headless) with puppeteer
 
10 Excellent Ways to Secure Spring Boot Applications - Okta Webinar 2020
10 Excellent Ways to Secure Spring Boot Applications - Okta Webinar 202010 Excellent Ways to Secure Spring Boot Applications - Okta Webinar 2020
10 Excellent Ways to Secure Spring Boot Applications - Okta Webinar 2020
 
Night Watch with QA
Night Watch with QANight Watch with QA
Night Watch with QA
 
High Performance Snippets
High Performance SnippetsHigh Performance Snippets
High Performance Snippets
 
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analystsMeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
MeasureCamp IX (London) - 10 JavaScript Concepts for web analysts
 

Recently uploaded

AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 

Recently uploaded (20)

AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 

Automation puzzlers

  • 4. driver.get("google.com"); What will selenium do? A: Open google.com B: Sent GET request C: NullPointerException D: WebDriverException
  • 5. org.openqa.selenium.WebDriverException: unknown error: unhandled inspector error: {"code":-32000, "message":"Cannot navigate to invalid URL"} (Session info: chrome=60.0.3112.113) (Driver info: chromedriver=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a),platfo rm=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 0 milliseconds ...
  • 6. People says that Selenide is better
  • 7. What will selenide do? A: Open google.com B: Wait four seconds C: NullPointerException D: WebDriverException selenide.open("google.com");
  • 8. Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: unhandled inspector error: {"code":-32000,"message":"Cannot navigate to invalid URL"} (Session info: chrome=61.0.3163.91) (Driver info: chromedriver=2.32.498513 (2c63aa53b2c658de596ed550eb5267ec5967b351),platform=Linux 4.10.0- 35-generic x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 14 milliseconds Build info: version: '3.4.0', revision: 'unknown', time: 'unknown' System info: host: 'sergey-asus', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.10.0-35-generic', java.version: '1.8.0_144' Driver info: org.openqa.selenium.chrome.ChromeDriver selenide.url: http://localhost:8080google.com
  • 9. What will happen? A: Set value to 1 B: NoSuchOptionException C: NullPointerException D: InvalidElementStateException <select id=”listBox”> <option value=’2’>1</option> </select> $("#listBox").setValue("1");
  • 10. Exception in thread "main" org.openqa.selenium.InvalidElementStateException: invalid element state: Element must be user-editable in order to clear it. (Session info: chrome=60.0.3112.113) (Driver info: chromedriver=2.32.498537 (cb2f855cbc7b82e20387eaf9a43f6b99b6105061),platform=Mac OS X 10.12.6 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 8 milliseconds
  • 11. What will be printed in console? B: Element page lost C: Nothing D: WrongLocatorException try{ $("element").waitUntil(appear, 3000);} catch(NoSuchElementException ex){ Assert.fail("Element page lost");} A: NoSuchElementException
  • 12. Exception in thread "main" Element not found {#bad} Expected: visible Screenshot: file:/home/sergey/Github/demo/build/reports/tests/1505985705319.0 .png Timeout: 3.500 s. Caused by: NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"#bad"} try{ $(“element”).waitUntil(appear, 3000); }catch(UIAssertionError ex){ Assert.fail(“Element page lost”); }
  • 13.
  • 14.
  • 15. Which text you got? A: “Text with spaces” B: “Text with spaces” C: Depends on browser D: “h1” <h1> Text with spaces </h1> findElement(By.tagName("h1")).getText();
  • 17. driver.manage().timeouts() .implicitlyWait(10,TimeUnit.SECONDS); wait = new WebDriverWait(driver,5); wait.until(ExpectedConditions .presenceOfElementLocated(locator)); How long will Selenium wait? A: 5 B: 15 C: 10 D: 0
  • 19. Which exception will be thrown? B: None C: NoSuchElement D: Both A: Timeout driver.manage().timeouts() .implicitlyWait(10,TimeUnit.SECONDS); wait = new WebDriverWait(driver,5); wait.until(ExpectedConditions .presenceOfElementLocated(locator));
  • 20.
  • 21. Which is faster? A: By.id B:By.Xpath C: They are equal D: By.css driver.findElement(By.id("someId")); driver.findElement(By.cssSelector("#someId"));
  • 22. static id(id) { return By.css('*[id="'+ escapeCss(id) +'"]'); } public WebElement findElement(SearchContext context) { if (context instanceof FindsById) return ((FindsById) context).findElementById(id); return ((FindsByXPath)context) .findElementByXPath(".//*[@id = '" + id + "']"); }
  • 23. How long will we wait here? A: 7 B: 12 C: 4 D: 3 driver.manage() .timeouts().implicitlyWait(3,SECONDS); $("wrongId"); driver.findElement(By.id("wrongId"));
  • 24. What will happen? A: Test will pass B: Assert fail C:NullPointerException D: NoSuchElement class Page{ WebElement header; } driver.get(“http://google.com”); Page p = initElements(driver,Page.class); Assert(p.header.text() == “Google”);
  • 25. INFO: Detected dialect: OSSException in thread "main" org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"name","selector":"header"} (Session info: chrome=60.0.3112.113) (Driver info: chromedriver=2.32.498537 (cb2f855cbc7b82e20387eaf9a43f6b99b6105061),platf orm=Mac OS X 10.12.6 x86_64) ...
  • 26. What will happen? A: HateJSException B: WebDriverException C: Print Text D: Object console.log($('div').getText());