mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 08:26:35 +08:00
24 lines
613 B
TypeScript
24 lines
613 B
TypeScript
import { NightwatchAPI, NightwatchTests } from 'nightwatch';
|
|
|
|
const test: NightwatchTests = {
|
|
before: (browser, done) => {
|
|
done();
|
|
},
|
|
'Demo test Google': (browser) => {
|
|
browser
|
|
.url('http://www.google.com')
|
|
.waitForElementVisible('body', 1000)
|
|
.setValue('input[type=text]', 'nightwatch')
|
|
.waitForElementVisible('button[name=btnG]', 1000)
|
|
.getTitle(function(result) {
|
|
this.assert.equal(typeof result, 'string');
|
|
})
|
|
.click('button[name=btnG]')
|
|
.pause(1000)
|
|
.assert.containsText('#main', 'Night Watch')
|
|
.end();
|
|
}
|
|
};
|
|
|
|
export = test;
|