while(flag)
{
try{
//element.isDisplayed();
String fla=element.getAttribute("visible");
if(fla.equals("true"))
{
flag=false;
}else {
flag=true;
swipe_ins(driver, "up");
}
}catch(Exception e)
{
swipe_ins(driver, "up");
count++;
if(count==5)
{
failNew(driver, "verify if element is displayed in screen", "", "element is not displayed in screen", ExtentTestManager.getTest());
break;
}
}
}