in chrome I get a xpath value:
//*[@id='user_change_pw_form']/div[3]/span
and for the same element in firebug I get:
/html/body/div[2]/form/div[3]/span
why do I have to speparate the xpath queries like that to get one and the same element in Selenium testcase:
switch (System.getProperty("test.driver"))
{
case "chrome":
case "html":
text = driver.findElement(By.xpath("//*[@id='user_change_pw_form']/div[3]/span")).getText();
case "gecko":
text = driver.findElement(By.xpath("/html/body/div[2]/form/div[3]/span")).getText();
break;
}
While the respective counterpart gives for the wrong browser "Unable to locate element", though both xpath queries work in both browser consoles.
Thanks in advance!