Skip to content

Instantly share code, notes, and snippets.

@santiycr
Created March 7, 2012 00:00
Show Gist options
  • Select an option

  • Save santiycr/1989951 to your computer and use it in GitHub Desktop.

Select an option

Save santiycr/1989951 to your computer and use it in GitHub Desktop.
package tests;
import junit.framework.TestCase;
import com.thoughtworks.selenium.*;
public class TestingSe1Sauce extends TestCase {
private DefaultSelenium selenium;
public void setUp() throws Exception {
DefaultSelenium selenium = new DefaultSelenium(
"ondemand.saucelabs.com",
80,
"{\"username\": \"SAUCE-USER\"," +
"\"access-key\": \"SAUCE-ACCESS-KEY\"," +
"\"os\": \"Mac 10.6\"," +
"\"browser\": \"safari\"," +
"\"browser-version\": \"5\"," +
"\"name\": \"Testing Safari on Mac with Selenium 1 on Sauce\"}",
"http://saucelabs.com/");
selenium.start();
this.selenium = selenium;
}
public void testSafariSe1Sauce() throws Exception {
this.selenium.open("/test/guinea-pig");
assertEquals("I am a page title - Sauce Labs",
this.selenium.getTitle());
}
public void tearDown() throws Exception {
this.selenium.stop();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment