I am trying to click on the following button on a linkedin page using selenium:
Solution 2:
Sometimes there are problems with buttons that are not clickable at the moment.
Try this:
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
wait = WebDriverWait(driver, 10)
button = wait.until(EC.element_to_be_clickable((By.XPATH, '[YOUR X_PATH TO THE BUTTON]')))
driver.execute_script("arguments[0].click()", button)
Copy
It's not the cleanest way to click any Button with selenium, but for me this method works mostly everytime.
The problem with your by class selectors is the multiple class names. See this question: How to get elements with multiple classes for more details on how to overcome that.
Share
Post a Comment
for "Click On Ember.js Enabled Element Using Selenium"
Post a Comment for "Click On Ember.js Enabled Element Using Selenium"