delete the red line
public static boolean isElementPresent(String xpathExpression){
[color=#FF0000:1tw4cnbx]System.out.println(c1.findElements(By.xpath(xpathExpression)).size());
[/color:1tw4cnbx]int o = c1.findElements(By.xpath(xpathExpression)).size();
if(o==0)
return false;
else
return true;
}
}
[quote="qtpselenium.supp0rt@gmail.com":1j71bg67]delete the red line
public static boolean isElementPresent(String xpathExpression){
System.out.println(c1.findElements(By.xpath(xpathExpression)).size());
int o = c1.findElements(By.xpath(xpathExpression)).size();
if(o==0)
return false;
else
return true;
}
}[/quote:1j71bg67]
It still fails with error on line: int o = c1.findElements(By.xpath(xpathExpression)).size();
When debug for some reason c1 though declared globally static ... it is pointing to null value..