Reputation: 47
I know there are many ways to make this, I've already tried
wait.until(EC.visibilityOfElementLocated(By.CLASS_NAME("market-title-v3")))
But I'm trying to search the element INSIDE another element, without call the driver for a fully search on page, and that's the problem (considering the fact that webelement has no attribute called "wait"). What I'm trying to do is something like this:
root_elm = driver.find_elements_by_xpath(xpath)
important_elm = root_elm.wait.until(EC.visibilityOfElementLocated(By.CLASS_NAME("market-title-v3")))
Can you guys tell me how could I do that?
Upvotes: 1
Views: 454
Reputation: 796
Try this:
root_elm = driver.find_elements_by_xpath(xpath)
important_elm = WebDriverWait(driver, 10).until(
EC.presence_of_element_located(By.CLASSNAME, "market-title-v3"))
Upvotes: 2