java - Edge webdriver fails on simple findElement -
i'm using selenium java & testng year testing web application being build dynamically. i'm testing chrome, ff , ie11 , feeling ready start edge webdriver. after implementing edge driver fits os build (release 14393), , loaded web page successfully,
i got issue when trying find element using xpath string:
".//*[contains(@class,'cbola-layer in-content-container-wrapper')]"
the error:
org.openqa.selenium.nosuchelementexception: no such element
that's simple code i'm using:
string layertypeattribute = driver.findelement(by.xpath(consts.xpath_string)).getattribute("layer_attribute");
is there workaround finding xpath?
installed java version 1.8.0_73
update: test fail when trying find element regardless of xpath. tried find class name , id , nothing came up. maybe important i'm testing web application being built async script runs inside page. can find simple html on page not related application, can't find application , not static script tag manually put in page.
try implement explicit wait. driver doesn't stop until element visible. can change 30 seconds amount wish.
webelement layertypeattribute = (new webdriverwait(driver, 30)).until(expectedconditions.presenceofelementlocated(by.xpath("xpath value")));
hope answers question.
Comments
Post a Comment