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
require 'rubygems' | |
require 'selenium-webdriver' | |
driver = Selenium::WebDriver.for(:remote, :url => "http://127.0.0.1:4444/wd/hub", :desired_capabilities => :firefox) | |
driver.get "http://seleniumhq.org" | |
sleep 5 | |
driver2 = Selenium::WebDriver.for(:remote, :url => "http://127.0.0.1:4444/wd/hub", :desired_capabilities => :firefox) |
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
GET | |
/api/v1/hub/config #Grid Hub configuration | |
/api/v1/proxies #List of all connected proxies | |
/api/v1/proxies/id #Info on a given connected proxy (Hostname, IP, Version, etc..) | |
/api/v1/proxies/id/config #Proxy configuration (node.json) | |
/api/v1/proxies/id/capabilities #Registered capabilities, (Browsers, maxInstances, etc..) | |
/api/v1/proxies/id/sessions #List of current sessions (possibly previous ones also) | |
/api/v1/queue #List of new sessions in queue, possibly add DELETE verb to get rid of items in queue that we want removed |
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
trs = selenium.find_elements(:css, "tr"); | |
trs.each -> tr #Storing current loop var in tr | |
tds = tr.find_elements(:css, "td"); | |
if tds[1] == "user-x" | |
trs[5].click |
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
def wait_for_ajax | |
Selenium::WebDriver::Wait.new(:timeout => 60).until do | |
sleep 1 | |
@selenium.execute_script("return jQuery.active") == 0 | |
end | |
end | |
public void waitForAjax() { |
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
#!/bin/bash +e | |
# allow change to pass-in display argument | |
DISPLAY=$1 | |
: ${DISPLAY:=:1} | |
export DISPLAY | |
echo "=== network before $0 ===" | |
netstat -na | grep "LISTEN " | |
echo |
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
#!/bin/bash -e | |
# allow change to pass-in display argument | |
DISPLAY=$1 | |
: ${DISPLAY:=:1} | |
export DISPLAY | |
echo "Starting VNC server" | |
vncserver ${DISPLAY} -geometry 1280x1024 |
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
{ | |
"capabilities": [ | |
{ | |
"platform": "MAC", | |
"seleniumProtocol": "WebDriver", | |
"browserName": "chrome", | |
"version": 31, | |
"maxInstances": 3 | |
}, | |
{ |
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
{ | |
"theConfigMap": { | |
"auto_start_hub": "1", | |
"default_role": "hub", | |
"node_config_files": [ | |
"node_5555.json" | |
], | |
"hub_config": {}, | |
"iedriver": { | |
"bit": "x64", |
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
class Disappointed | |
def ಠ_ಠ | |
puts "DISAPPOINTED!!!" | |
end | |
end |
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
1.8.7 :024 > driver = Selenium::WebDriver.for(:remote, :url => "http://10.20.43.98:4444/wd/hub", :desired_capabilities => caps) | |
Selenium::WebDriver::Error::UnknownError: unknown error | |
from [remote server] org.openqa.selenium.remote.RemoteWebDriver(RemoteWebDriver.java):600:in `execute' | |
from [remote server] org.openqa.selenium.remote.RemoteWebDriver(RemoteWebDriver.java):241:in `startSession' | |
from [remote server] org.openqa.selenium.remote.RemoteWebDriver(RemoteWebDriver.java):226:in `startSession' | |
from [remote server] org.openqa.selenium.ie.InternetExplorerDriver(InternetExplorerDriver.java):182:in `run' | |
from [remote server] org.openqa.selenium.ie.InternetExplorerDriver(InternetExplorerDriver.java):174:in `<init>' | |
from [remote server] org.openqa.selenium.ie.InternetExplorerDriver(InternetExplorerDriver.java):150:in `<init>' | |
from [remote server] sun.reflect.NativeConstructorAccessorImpl():-2:in `newInstance0' | |
from [remote server] sun.reflect.NativeConstructorAccessorImpl():-1:in `newInstance' |
NewerOlder