Created
March 7, 2012 00:00
-
-
Save santiycr/1989951 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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