'Selenium Python cannot reinitialize DataTable
I have a problem with Python Selenium that cannot fix until now. Specifically, the website has a box search and a table of result, I'm using Webdriver from Selenium to fill the search content into the box, send key ENTER then get the data from the table, but it warns that the DataTable cannot initialize. So how can I fix this? My code is as below
string_date = datetime_.strftime("%d-%m-%Y")
driver.find_elements(By.XPATH, '<some XPATH>')[0].clear()
driver.find_elements(By.XPATH, '<some XPATH>')[0].send_keys(string_date)
driver.find_elements(By.XPATH, '<some XPATH>')[0].send_keys(Keys.ENTER)
table_elements = driver.find_elements(By.XPATH, '//*[@id="table-one"]/tbody')[0].find_elements(By.TAG_NAME, "tr") #
I have tried to put time.sleep() and WebDriverWait before find table element but it does not work.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
