test.open('http://foo.baz')
.click('.bar')
.waitForElement('#baz')
.assert.title().is('fooBar', 'Yeah')
.done();
.open('http://dalekjs.com')
.click('#logout')
.type('#MyElement', 'Mein Text')
.waitForElement('#result')
test.screenshot('my/folder/my_file.png');
.exists()
Asserts that an element exists.
.assert.exists('#Logout', 'Logout Button is there')
.text()
Asserts that given text does exist.
.assert.text('h1', 'Expected Headline', 'Headline is correct')
.val()
Asserts that a given form field has the provided value.
.assert.val('#mySelect', '', 'Default Value ist correct')
module.exports = {
'Check Login status': function (test) {
test
.open('https://github.com/')
.waitForElement('.header')
.assert.exists('.header-logged-out', 'User is logged out')
.done();
}
};
# Install
npm install dalek-browser-chrome --save-dev
# Execute
dalek tests/firstTests.js -b chrome