ݺߣ

ݺߣShare a Scribd company logo
Agenda
Automating Modern Web applications
Problem
Solution
Demo
Set up
1.Java
2.Maven or Gradle
3.Selenium
4.Chrome
5.Firefox
6.Edge
7.ChromeDriver
8.GeckoDriver
9.EdgeDriver
10.Junit/testNG
11.IntelliJ
12.Xvfb
Recording
{
"id": "6152b44b-3c86-44e9-9f0d-aa9431e8065e",
"version": "1.1",
"name": "TestProject",
"url": "https://www.google.com",
"tests": [{
"id": "7773e50d-f253-41e6-a55e-73a9d4a0c6f1",
"name": "Google",
"commands": [{
"id": "94d04a96-5387-4644-99a5-f853cf921b24",
"comment": "",
"command": "open",
"target": "/",
"targets": [],
"value": ""
}, {

{
"id": "6152b44b-3c86-44e9-9f0d-aa9431e8065e",
"version": "1.1",
"name": "TestProject",
"url": "https://www.google.com",
"tests": [{
"id": "7773e50d-f253-41e6-a55e-73a9d4a0c6f1",
"name": "Google",
"commands": [{
"id": "94d04a96-5387-4644-99a5-f853cf921b24",
"comment": "",
"command": "open",
"target": "/",
"targets": [],
Flakiness
Selectors
Source based
Intrusive
By.Id(pressMe)
By.Name(pressMe)
Structural
By.xpath(//html/body/button)
Waits
Explicit wait
Implicit
Driver.findElement().click()
wait = new WebDriverWait(driver, 20);
wait.until()
Fluent wait
new FluentWait(WebDriver reference)
.withTimeout(timeout, SECONDS)
.pollingEvery(timeout, SECONDS)
Dumb
Taiko
Set up
$ npm install -g taiko
Recording
$ taiko
Version: 0.1.0 (Chromium:69.0.3476.0)
Type .api for help and .exit to quit
>
Locators
$ taiko
Version: 0.1.0 (Chromium:69.0.3476.0)
Type .api for help and .exit to quit
> click(PRESS ME)
Flakiness
const { openBrowser, goto, write,
press, near, checkBox, click } = require('taiko');
(async () => {
await openBrowser({headless:false});
await goto("http://todomvc.com/examples/react/#/");
await write("automate with taiko");
await press("Enter");
await click(checkBox(near("automate with taiko")));
closeBrowser();
})();
Smart
Taiko
Demo

More Related Content

Taiko presentation