presenceOfElementLocated in selenium unable to locate presence of Webelemnt -
webdriver driver =new firefoxdriver(); driver.get("http://www.goibibo.com/"); webdriverwait driverwait=new webdriverwait(driver,60); webelement mydynamicelement=driverwait.until(expectedconditions.presenceofelementlocated(by.xpath("//*[@id='hdr_user_signin']/span/a[2]"))); boolean number=mydynamicelement.isdisplayed(); system.out.println(number);
answer got 'false' though put wait of 60 sec.
don't know why unable locate presence of element....
mydynamicelement
has been located successfully, hidden. not asking selenium find if element displayed presenceofelementlocated
.
meaning presenceofelementlocated
, visibilityofelementlocated
not same. believe looking visibilityofelementlocated
. see api doc here
Comments
Post a Comment