🕵️♂️
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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(function() { | |
| it('should login', function() { | |
| "#inputUsername".setValue('userA'); | |
| "#inputPassword".setValue('*****'); | |
| ".submit".click(); | |
| return browser.getTitle().should.be.equal('Welcome userA'); | |
| }); |
This file contains hidden or 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
| <testsuites name="phantomjs" tests="10" failures="2" errors="1" disabled="1" time="3.845"> | |
| <testsuite name="google page" tests="4" failures="1" skipped="0" disabled="0" time="2.754" timestamp="Thu May 21 2015 02:10:50 GMT+0200 (CEST)" id="1" file="/Users/christianbromann/Sites/Webprojekte/webdriverjs/DEV/specs/test.google.spec.js"> | |
| <testcase name="should have title1" disabled="false" time="0.977" id="2" file="/Users/christianbromann/Sites/Webprojekte/webdriverjs/DEV/specs/test.google.spec.js" status="passed"> | |
| <system-out type="command"><![CDATA[ | |
| POST http://0.0.0.0:4444/wd/hub/session/15787134-1f6b-4da7-a1c8-86c656c366e0/url - {"url":"http://localhost:8080"} | |
| GET http://0.0.0.0:4444/wd/hub/session/15787134-1f6b-4da7-a1c8-86c656c366e0/title - {} | |
| ]]></system-out> | |
| <system-out type="result"><![CDATA[ | |
| POST http://0.0.0.0:4444/wd/hub/session/15787134-1f6b-4da7-a1c8-86c656c366e0/url - {"state":"success","sessionId":"15787134-1f6b-4da7-a1c8-86c656c366e0","hCode":845403856,"value":null,"clas |
This file contains hidden or 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
| [{ | |
| "a": 1, | |
| "b": 2 | |
| }, { | |
| "c": 3, | |
| "d": [1, 2, 3, 4, 5], | |
| "e": [{ | |
| "some": "object", | |
| "other": "thing" | |
| }] |
This file contains hidden or 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
| { | |
| "name": "wdio-examples", | |
| "version": "1.0.0", | |
| "description": "WebdriverIO examples", | |
| "dependencies": { | |
| "wdio-sauce-service": "^0.3.0", | |
| "wdio-selenium-standalone-service": "^0.0.7", | |
| "wdio-spec-reporter": "0.0.3", | |
| "webdriverio": "^4.4.0" | |
| }, |