Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make compatible with saucelabs-adapter 0.7.2

  • Loading branch information...
commit d733382a60c561abba6750d8bdd79242801db51e 1 parent 7a09101
Sam Pierson authored
View
9 java/source_server/net/jsunit/SeleniumTest.java
@@ -66,7 +66,7 @@ private void startSauceTunnel() throws IOException {
break;
}
}
- System.out.println("done starting tunnel");
+ System.out.println("done starting tunnel, remote end is '" + seleniumConfig.get("application_address") + "'");
}
private void stopSauceTunnel() throws IOException {
@@ -127,7 +127,12 @@ private void stopJsUnitServer() {
private void startSeleniumClient() throws Exception {
String host = seleniumConfig.get("selenium_server_address");
int port = Integer.parseInt(seleniumConfig.get("selenium_server_port"));
- String start_command = seleniumConfig.get("selenium_browser_key");
+ String start_command = "{" +
+ "\"username\": \"" + seleniumConfig.get("saucelabs_username") + "\", " +
+ "\"access-key\": \"" + seleniumConfig.get("saucelabs_access_key") + "\", " +
+ "\"os\": \"" + seleniumConfig.get("saucelabs_browser_os") + "\", " +
+ "\"browser\": \"" + seleniumConfig.get("saucelabs_browser") + "\", " +
+ "\"browser-version\": \"" + seleniumConfig.get("saucelabs_browser_version") + "\"}";
String browser_url = "http://" + seleniumConfig.get("application_address") + ":" + seleniumConfig.get("application_port");
selenium = new DefaultSelenium(host, port, start_command, browser_url);
selenium.start();
View
6 sauce-tunnel-setup.rb
@@ -1,13 +1,13 @@
#!/usr/bin/env ruby
require 'rubygems'
-require 'saucelabs-adapter'
+require 'saucelabs_adapter'
STDOUT.sync = true
def start_tunnel
puts "[sauce-tunnel] Starting tunnel"
- @tunnel = SauceTunnel.new(@selenium_config)
+ @tunnel = SaucelabsAdapter::SauceTunnel.new(@selenium_config)
end
def stop_tunnel
@@ -20,7 +20,7 @@ def stop_tunnel
Signal.trap('TERM') { stop_tunnel }
Signal.trap('HUP') { stop_tunnel }
-@selenium_config = SeleniumConfig.new('saucelabs', '../selenium.yml', 8080)
+@selenium_config = SaucelabsAdapter::SeleniumConfig.new('saucelabs', '../selenium.yml')
start_tunnel
sleep 3600
Please sign in to comment.
Something went wrong with that request. Please try again.