Created
March 30, 2012 16:47
-
-
Save stackedsax/2252766 to your computer and use it in GitHub Desktop.
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
With this in my code: | |
capability.setCapability(FirefoxDriver.PROFILE, "Firefox8"); | |
I see this occur on the VM: | |
09:07:06.564 INFO - Executing: [new session: {platform=WINDOWS, firefox_profile=Firefox8, firefox_binary=C:\Program Files\Mozilla Fire..., browserName=firefox, version=4.0}] at URL: /session) | |
but even though firefox_profile=Firefox8, the Firefox8 profile is not used. |
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
package com.yahoo.media.mediaqa.selenium2test; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.remote.DesiredCapabilities; | |
import org.openqa.selenium.remote.RemoteWebDriver; | |
import org.openqa.selenium.android.AndroidDriver; | |
import org.openqa.selenium.firefox.*; | |
import org.openqa.selenium.firefox.internal.ProfilesIni; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import org.testng.Assert; | |
import org.testng.annotations.*; | |
public class selenium2test { | |
/** | |
* @param args | |
*/ | |
@Test | |
public static void main(String[] args) { | |
capability.setCapability(FirefoxDriver.PROFILE, "Firefox8"); | |
capability.setBrowserName("firefox"); | |
capability.setPlatform(org.openqa.selenium.Platform.WINDOWS); | |
capability.setVersion("4.0"); | |
URL url; | |
try { | |
url = new URL( "http", "selgrid1.global.media.corp.yahoo.com", 80, "/wd/hub" ); | |
RemoteWebDriver driver = new RemoteWebDriver(url, capability); | |
String baseUrl = "http://google.com"; | |
try { | |
Thread.sleep(5000); | |
} catch (InterruptedException e) { | |
e.printStackTrace(); | |
} | |
driver.get(baseUrl); | |
Assert.assertEquals("Google", driver.getTitle()); | |
System.out.println(driver.getTitle()); | |
driver.quit(); | |
} catch (MalformedURLException e) { | |
e.printStackTrace(); | |
} | |
} | |
@Test | |
public void signIn() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment