try:
button = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "//div[contains (@class, 'hb-fzpaiS dEBb srjgzgk7zu4')]")))
try:
ActionChains(driver).move_to_element(button).click().perform()
except Exception as e:
print(f"Failed to click button using ActionChains for {link}: {e}")
try:
driver.execute_script("arguments[0].click();", button)
except Exception as e:
print(f"Failed to click button using JavaScript for {link}: {e}")
try:
button.click()
except Exception as e:
print(f"Failed to click button directly for {link}: {e}")
except Exception as e:
print(f"Button not clickable or not found for {link}: {e}")
I controlled the xpath. And Xpath is true. But When I was running the code block, I got GetHandleVerifier error. I tried many try-except block but I couldn’t solve that.
Won’t I be able to click on the div? How can I solve this problem?