Retrieving data:
driver.findElement(By.id("id")).getAttribute("value");
Store the value in the string and retrieve it
You can also use 'getText()'
Retrieving Check box value:
driver.findElement(By.id("id1")).getAttribute("checked");
The outcome will be a Boolean value
Page title:
driver.getTitle();
Store the value in the string and retrieve it
Page source and URL:
driver.getPageSource();
driver.getCurrentUrl();
No comments:
Post a Comment