Reputation: 41
when i execute
"document.getElementsByClassName("jobs-company-card__cta-link ember-view");"
in the console (javascript) it returns the elements by that class name but when i execute :
driver.findElements(By.className("jobs-company-card__content-wrapper"));
the result (element) is an empty List , noting is returned
Upvotes: 0
Views: 58
Reputation: 41
SOLVED all i had to do is add this
WebDriverWait wait= new WebDriverWait(driver,20 );
wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("div.jobs-company-card__content-wrapper")));
Upvotes: 1
Reputation: 842
Have you tried using CSS selectors instead?
driver.findElements(By.cssSelector(".jobs-company-card__content-wrapper"));
Upvotes: 0