Created
February 19, 2012 11:51
-
-
Save testingbot/1863415 to your computer and use it in GitHub Desktop.
testingbot java example
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
import com.thoughtworks.selenium.*; | |
import org.junit.*; | |
import com.testingbot.*; | |
public class SmokeTest extends TestingBotTestCase { | |
public void setUp() throws Exception { | |
TestingBotSelenium selenium = new TestingBotSelenium( | |
"hub.testingbot.com", | |
4444, | |
"{\"client_key\": \"[key]\"," + | |
"\"client_secret\": \"[secret]\"," + | |
"\"os\": \"Windows\"," + | |
"\"browserName\": \"firefox\"," + | |
"\"browserVersion\": \"10\"}", | |
"http://www.google.com/"); | |
this.selenium = selenium; | |
selenium.start("version=10;platform=WINDOWS;screenshot=false"); | |
} | |
public void testGoogle() throws Exception { | |
this.selenium.open("/"); | |
assertEquals("Google", 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