To click on Se flere you have to induce WebDriverWait for the element_to_be_clickable()
and you can use either of the following Locator Strategies:
Using CSS_SELECTOR
:
driver.get('https://coop.no/sortiment/obs-bygg/hageuterom/hytter-boder-og-drivhus')
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "button[type='CategoryPage']"))).click()
Using XPATH
:
driver.get('https://coop.no/sortiment/obs-bygg/hageuterom/hytter-boder-og-drivhus')
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//button[@type='CategoryPage']"))).click()
Note : You have to add the following imports :
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
Browser Snapshot:
Reference
You can find a couple of detailed discussion in:
- Can not click on a Element: ElementClickInterceptedException in Splinter / Selenium
- ElementClickInterceptedException: Message: element click intercepted: Element is not clickable with Selenium and Python