The below code is used to identify the perticular web element is present or not in the webpage after moving from one page to another page.
public void UserObject_Present(WebDriver driver1,String identify)
{
boolean Result;
do
{
try
{
WebElement elementt3= driver1.findElement(By.id(identify));
Result=false;
}
catch (NoSuchElementException e)
{
Result=true;
}
}while(Result);
}
No comments:
Post a Comment