Answer the question
In order to leave comments, you need to log in
How to get current html data after click() method in Selenium?
I can connect and follow the link:
from selenium import web driver
driver = webdriver.Firefox()
driver.get("https://www.example.com")
driver.find_element_by_xpath("/html/body/div...]").click()
Answer the question
In order to leave comments, you need to log in
Perhaps the problem is that the data did not have time to load
About waiting, read here about waiting
I did something like this
from selenium import webdriver
import selenium.webdriver.support.ui as ui
browser = webdriver.Firefox()
wait = ui.WebDriverWait(browser,30)
browser.execute_script('')#скрипт осуществлял переход на другую страницу в моем случае так в вашем по другому (driver.find_element_by_xpath("/html/body/div...]").click())
wait.until(lambda browser: browser.find_element_by_id('someID'))
some_info = browser.find_element_by_id('someID').get_attribute("outerHTML")
Found this: How to get Selenium to wait for page load after a click , but haven't figured it out yet.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question