Valet is a decentralized test automation network where developers run tests on real devices (iOS or Android), and device owners get paid for executing them. Using Nostr for discovery, Lightning for payments, and Raspberry Pi nodes for execution, it’s less expensive, more open, and more scalable than traditional test clouds. Built by Jason Huggins (Selenium, Appium, Sauce Labs), Valet is an experiment in P2P testing at scale. 🚀
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 |
NewerOlder