Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // test.js
- var webdriverio = require('webdriverio');
- var options = {
- desiredCapabilities: {
- browserName: 'chrome'
- }
- };
- webdriverio
- .remote(options)
- .init()
- .url('http://www.google.com')
- .title(function(err, res) {
- console.log('Title was: ' + res.value);
- })
- .end();
- // test-mocha.js
- var expect = require('expect.js');
- var webdriverio = require('webdriverio');
- var options = {
- desiredCapabilities: {
- browserName: 'chrome'
- }
- };
- describe('WebdriverIO Sample Test', function () {
- it('should return "Google"', function () {
- webdriverio
- .remote(options)
- .init()
- .url('http://www.google.com')
- .title(function(err, res) {
- var title = res.value;
- expect(title).to.be('Google');
- })
- .end();
- })
- });
- WebdriverIO Sample Test
- ✓ should return "Google"
- 1 passing (4ms)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement