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 webdriverio = require('webdriverio'); | |
var options = { desiredCapabilities: { browserName: 'chrome' }, logLevel: 'verbose' }; | |
var client = webdriverio.remote(options); | |
client | |
.init() | |
.windowHandleSize({width: 1920, height: 1080}) | |
.url('https://showbox.com/workspace.html') | |
.waitForExist('.login button[data-modal="signup"]', 10000) | |
.click('.login button[data-modal="signup"]') |
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
// test file: | |
describe('Suite name', function() { | |
it('Should work', function() { | |
return browser | |
.url('https://google.com') | |
.pause(2000) | |
}); | |
}); | |
// `after` 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
# selenium webdriver API: http://selenium-python.readthedocs.org/api.html | |
import time | |
import json | |
import sys | |
from selenium import webdriver | |
from selenium.common import exceptions | |
class Webpage(object): | |
"""A headless PhantomJS page running the formular page""" |
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
// run with: `./node_modules/.bin/mocha --timeout 600000 example.js` | |
// considering you have mocha installed locally. | |
var webdriverio = require('webdriverio'), | |
mocha = require('mocha'), | |
client = {}; | |
client = webdriverio.remote( | |
{ | |
desiredCapabilities: {browserName: 'chrome'}, | |
logLevel: 'verbose' |
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 webdriverio = require('webdriverio'), | |
assert = require('assert'), | |
client = {}, | |
url = 'http://google.com'; | |
client = webdriverio.remote( | |
{ | |
desiredCapabilities: {browserName: 'chrome'}, | |
logLevel: 'verbose' | |
} |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import pycurl | |
import xml.dom.minidom | |
import StringIO | |
import sys | |
import gtk | |
import os | |
import locale | |
import gettext |
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
[31mRuntimeError: no such element[0m | |
[1;30m at element(".format-img") at /srv/build/workspace/Integration Tests/node_modules/webdriverio/lib/commands/click.js:27:17 | |
at elements(".format-img") at /srv/build/workspace/Integration Tests/node_modules/webdriverio/lib/commands/isExisting.js:41:17 | |
at isExisting(".format-img") at /srv/build/workspace/Integration Tests/node_modules/webdriverio/lib/commands/waitForExist.js:31:21[0m | |
[31mRuntimeError: no such element[0m | |
[1;30m at element(".format-img") at /srv/build/workspace/Integration Tests/node_modules/webdriverio/lib/commands/click.js:27:17 | |
at elements(".format-img") at /srv/build/workspace/Integration Tests/node_modules/webdriverio/lib/commands/isExisting.js:41:17 | |
at isExisting(".format-img") at /srv/build/workspace/Integration Tests/node_modules/webdriverio/lib/commands/waitForExist.js:31:21[0m | |
[31mRuntimeError: no such element[0m | |
[1;30m at element(".format-img") at /srv/build/workspace/Integration Tests/node_modules/webdri |
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
#!/usr/bin/env python | |
# from: http://www.devttys0.com/2015/04/hacking-the-d-link-dir-890l/ | |
import sys | |
import urllib2 | |
import httplib | |
try: | |
ip_port = sys.argv[1].split(':') | |
ip = ip_port[0] | |
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
// run with: TEST_ENV=prod2 ./node_modules/.bin/mocha --timeout 99999 simplified.js | |
var webdriverio = require('webdriverio'), | |
mocha = require('mocha'), | |
assert = require('assert'), | |
q = require('q'), | |
env = process.env.TEST_ENV, | |
url = env ? 'https://' + env + '-env.showbox.com/workspace.html' : 'https://showbox.com/workspace.html'; | |
var client = webdriverio.remote( | |
{ |
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
// run with: ./node_modules/.bin/mocha --timeout 99999 testme.js | |
var webdriverio = require('webdriverio'), | |
mocha = require('mocha'), | |
url = "http://google.com"; | |
var client = webdriverio.remote( | |
{ | |
desiredCapabilities: {browserName: 'chrome'} | |
} | |
); |