I am trying to scrape from a dynamically loaded table using Selenium
Since it is dynamically loaded by javascript, I need to use Webdriverwait but I am keep getting
Timeout exception errors
My code is as below :
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
driver = webdriver.Chrome("my_path")
import time
URL = r'https://www.customs.go.jp/toukei/srch/indexe.htm?M=09&P=1,2,,,,,,,,1,0,2020,0,10,0,2,440131,,,,,,,,,,1,,,,,,,,,,,,,,,,,,,,,,200'
driver.get(URL)
data = WebDriverWait(driver, 15).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".value")))
print(data.text)
I have searching through all possible ways to do the WebDriverWait, but all the below options did not work
WebDriverWait(driver, 15).until_not(EC.title_is(title))
driver.set_script_timeout(10)
time.sleep(10)
element = wait.until(EC.element_to_be_clickable((By.XPATH, '//div[@class="test"]')))
My ultimate goal is to scrape the table from the URL. Can anyone help?