dalek.js - automated cross browser testing with javascript
DESCRIPTION
A short introduction to one of the most easy-to-use cross browser testing tool. DalekJS helps you write simple instructions to drive either headless browser or real browsers, to see if your application works as expectedTRANSCRIPT
![Page 1: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/1.jpg)
DalekJSMy Name Is Not Sisyphus!
orLet Others Do Your Dirty Work
orAutomated Cross Browser Testing With JavaScript
![Page 2: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/2.jpg)
Introduction
![Page 3: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/3.jpg)
DalekJS :: What is DalekJS?
An easy to use JavaScript based
cross platform automated cross
browser black-box testing tool
DalekJS website Nir Elbaz
![Page 4: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/4.jpg)
DalekJS :: Main Features
❖ Launch & automate your browser❖ Fill & submit forms❖ Click & follow links❖ Capture screenshots❖ Run your functional tests
Nir Elbaz
![Page 5: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/5.jpg)
DalekJS :: Prerequisites
❖ Terminal friendly❖ Basic HTML & JavaScript❖ CSS selectors
Software:
❖ Terminal (command prompt)❖ Notepad
Nir Elbaz
![Page 6: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/6.jpg)
CSS Selector
![Page 7: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/7.jpg)
DalekJS :: CSS Selectors
Select the element(s) you want to style
Selector {Property: Value;Property: Value;...
}
Selector {Property: Value;...
}
body {color: Red;font-size: 11px;...
}
#myButton {display: none;...
}
Nir Elbaz
![Page 8: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/8.jpg)
DalekJS :: CSS Selectors
Selector types❖ element❖ #id❖ .class❖ [attribute]❖ [attribute=value]❖ :pseudo-class❖ ::pseudo-element❖ …
CSS Selectors Demo
❖ element1 descendant❖ element1 > child❖ element1 + adjacent❖ element1 ~ preceed❖ element:nth-child(2)❖ :not(selector)❖ …
Nir Elbaz
![Page 9: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/9.jpg)
Installation
![Page 10: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/10.jpg)
DalekJS :: Installation
1. Install node.js2. Create a new directory for your tests3. Open terminal (command prompt)
a. Install dalekjs command line interface globally:npm install dalek-cli -g
b. Change path (cd) to tests directory
c. Install dalekjs package locally:npm install dalekjs
Nir Elbaz
![Page 11: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/11.jpg)
DalekJS :: Installation
Advance installations
1. Install more browsers drivers:npm install dalek-browser-chrome
npm install dalek-browser-ie
npm install dalek-browser-firefox
npm install dalek-browser-ios
1. Install reports:npm install dalek-reporter-html
Nir Elbaz
![Page 12: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/12.jpg)
Hands On
![Page 13: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/13.jpg)
DalekJS :: Hands On
Test file sample (*.js)
module.exports = {
'Page title is correct': function (test) {
test
.open('http://google.com')
.assert.title().is('Google', 'It has title')
.done();
}
};
Nir Elbaz
![Page 14: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/14.jpg)
DalekJS :: Hands On
Running a test file using PhantomJS:dalek filename
Running a test file using a real browser:dalek filename -b chrome
Running a test file & create a report:dalek filename -r myreport.html
Nir Elbaz
![Page 15: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/15.jpg)
DalekJS :: Hands On
Actions - a way to control your browsers,e.g. simulate user interactions like clickingelements, open urls, filling out inputfields, etc.
reload, forward, open, submit, click, wait,
type, setValue, maximize, toParent...
DalekJS Cheat Sheet Nir Elbaz
![Page 16: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/16.jpg)
Assertions - check if the assumptionsyou made about a website are correct.For example they might check if the titleof a page or the content text of an elementis as expected
height, css, attr, exists, text, cookie...
DalekJS :: Hands On
DalekJS Cheat Sheet Nir Elbaz
![Page 17: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/17.jpg)
Demo
![Page 18: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/18.jpg)
Prolog
![Page 19: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/19.jpg)
DalekJS :: Prolog
❖ An easy to use UI testing automation tool❖ Can increase QA & Dev teams productivity
Create scripts repository, use task scheduler to auto-run test files...
❖ Great for regression & routine testing❖ Learn more on DalekJS.com & cheat sheet
However...
❖ It is still beta❖ This is NOT the only tool out there
![Page 20: Dalek.js - Automated cross browser testing with JavaScript](https://reader034.vdocument.in/reader034/viewer/2022042613/547ec1a3b4af9faa158b570a/html5/thumbnails/20.jpg)
Nir Elbaz