Selenium error element click intercepted:Other element would receive the click

Selenium error element click intercepted:Other element would receive t…

더시민 0 396 0
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.common.exceptions import ElementClickInterceptedException
from selenium.webdriver.chrome.options import Options
from time import sleep

options = Options()
options.add_argument("--disable-notifications")

driver = webdriver.Chrome(executable_path='D://chromedriver/100/chromedriver.exe', options=options)
wait = WebDriverWait(driver, 20)

url = "https://www.bandsintown.com/e/1024477910-hot-8-brass-band-at-the-howlin%27-wolf?came_from=253&utm_medium=web&utm_source=city_page&utm_campaign=event"

driver.get(url)

try:
    showmore_link = wait.until(EC.element_to_be_clickable((By.XPATH, '//div[@class="xXGKBimvIBU_aEdJh3EF"]')))
    showmore_link.click()

except ElementClickInterceptedException:
    print("Trying to click on the button again")
    driver.execute_script("arguments[0].click()", showmore_link)

0 Comments
제목
Category
Facebook Twitter GooglePlus KakaoStory KakaoTalk NaverBand