🕵️♂️
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var client = require("webdriverio").remote({ | |
desiredCapabilities: { | |
browserName: 'chrome', | |
chromeOptions: { | |
args: ['window-size=2880,1800'] | |
} | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('getAttribute', function() { | |
it('should test data attribute', function(done) { | |
client.getAttribute('#elem', 'data-type', function(err, attr) { | |
assert(err === null); | |
assert(attr === 'example'); // true | |
}).call(done); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* old depcrecated version | |
*/ | |
client.execute(function(arg1,arg2){ | |
// do soemthing | |
},[arg1,arg2]); | |
// ----------------------------------------- | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* got list with 253 entries | |
*/ | |
div { | |
background-attachment : scroll; | |
background-clip : border-box; | |
background-color : rgba(0, 0, 0, 0); | |
background-image : none; | |
background-origin : padding-box; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Example feature | |
As a user of webdriverjs | |
I should be able to use different commands | |
to get informations about elements on the page | |
Scenario: Get size of an element | |
Given I go on the website "https://github.com/" | |
When I use getElementSize() on the element ".header-logo-wordmark" | |
Then I should get a width of "89" and height of "32" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var vows = require('vows'), | |
assert = require('assert'), | |
webdriverjs = require('webdriverjs'), | |
fs = require('fs'); | |
var client; | |
// Create a Test Suite | |
vows.describe('my github tests').addBatch({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var webdriverjs = require('webdriverjs'), | |
assert = require('assert'); | |
module.exports = { | |
setUp: function (callback) { | |
client = webdriverjs.remote({ desiredCapabilities: {browserName: 'phantomjs'} }); | |
client.init(); | |
callback(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var webdriverjs = require('webdriverjs'), | |
assert = require('assert'); | |
describe('my webdriverjs tests', function(){ | |
this.timeout(99999999); | |
var client = {}; | |
before(function(){ | |
client = webdriverjs.remote({ desiredCapabilities: {browserName: 'phantomjs'} }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var chai = require('chai'), | |
assert = chai.assert, | |
expect = chai.expect, | |
webdriverjs = require('webdriverjs'); | |
describe('my webdriverjs tests', function(){ | |
this.timeout(99999999); | |
var client = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var webdriverjs = require('webdriverjs'); | |
describe('my webdriverjs tests', function() { | |
var client = {}; | |
jasmine.DEFAULT_TIMEOUT_INTERVAL = 9999999; | |
beforeEach(function() { | |
client = webdriverjs.remote({ desiredCapabilities: {browserName: 'phantomjs'} }); | |
client.init(); |