I want to get url(baseUrl = "http://google.com";) that is declared in selenium test class from my java class.how can i get the url
is there any selenium api class. Please suggest me
public class SeleJunit {
private WebDriver driver;
private String baseUrl;
private boolean acceptNextAlert = true;
private StringBuffer verificationErrors = new StringBuffer();
@Before
public void setUp() throws Exception {
driver = new FirefoxDriver();
baseUrl = "http://localhost:8080/";
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
}
@Test
public void testSeleJunit1() throws Exception {
driver.get(baseUrl + "/");
driver.findElement(By.linkText("New Item")).click();
driver.findElement(By.id("name")).click();
driver.findElement(By.id("name")).clear();
driver.findElement(By.id("name")).sendKeys("i18n2");
driver.findElement(By.name("mode")).click();
driver.findElement(By.id("ok-button")).click();
new Select(driver.findElement(By.name("_.compressionLevel"))).selectByVisibleText("System Default");
// ERROR: Caught exception [Error: Dom locators are not implemented yet!]
driver.findElement(By.id("side-panel")).click();
driver.findElement(By.id("yui-gen30-button")).click();
driver.findElement(By.linkText("Jenkins")).click();
}