python – How to locate and click on next button on Gettyimages

Can it really be true, that I’m not allow to click this button??

From https://www.gettyimages.dk/search/2/image?phrase=lfc The link can also be in format of https://www.gettyimages.dk/photos/lfc?assettype=image&phrase=lfc&sort=mostpopular&license= rf,rm&page=1 . I dont know what is the difference between the two. I have only tried with https://www.gettyimages.dk/search/2/image?phrase=lfc. Can that be the reason why I’m having dificulties clicking the button?

CSS-Selector 1

WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.CSS_SELECTOR, 'body > div.content_wrapper > section > div > main > div > div > div:nth-child(4) > div.Gallery-module__columnContainer___LqU0P > section > a'))).click()

Error:selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <a class="PaginationRow-module__button___QQbMu PaginationRow-module__nextButton___gH3HZ" title="Next page" rel="next">...</a> is not clickable at point (677, 23). Other element would receive the click: <input class="SearchBox-getty-module__input___VMxL0" data-testid="container-search-box-input" placeholder="Search the world’s best photos and images" aria-label="text" name="phrase" autocomplete="off" data-autosuggest-from="https://as.gettyservices.com:443/GettyImages.Autocomplete.KeywordService.Service/KeywordService1/Suggestedkeywords/{0}/{1}/{2}/{3}/{4}?usePopularity=true" value="lfc">

CSS-Selector 2

 WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.CSS_SELECTOR, 'body > div.content_wrapper > section > div > main > div > div > div:nth-child(4) > div.Gallery-module__columnContainer___LqU0P > section > a > div'))).click()

Error: selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <div class="PaginationRow-module__buttonText___XM2mA">...</div> is not clickable at point (673, 9). Other element would receive the click: <div class="SearchBox-getty-module__container___eqbmV" data-testid="container-search-box">...</div>

CSS-Selector 3

WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.CSS_SELECTOR, 'body > div.content_wrapper > section > div > main > div > div > div:nth-child(4) > div.Gallery-module__columnContainer___LqU0P > section > a > svg'))).click()

Error:selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <svg xmlns="http://www.w3.org/2000/svg" width="8.233" height="13.861" viewBox="0 -4.861 8.233 13.861" class="PaginationRow-module__icon___daw1U">...</svg> is not clickable at point (703, 7). Other element would receive the click: <div class="SearchBox-getty-module__container___eqbmV" data-testid="container-search-box">...</div>
  (Session info: chrome=103.0.5060.134)

CSS-Selector 4

WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.CSS_SELECTOR, 'body > div.content_wrapper > section > div > main > div > div > div:nth-child(4) > div.Gallery-module__columnContainer___LqU0P > section > a > svg > path'))).click()

Error:selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <path d="M8.233 2.018L1.251 9 0 7.645l5.627-5.627L0-3.61l1.251-1.25 6.982 6.878z"></path> is not clickable at point (703, 7). Other element would receive the click: <div class="SearchBox-getty-module__container___eqbmV" data-testid="container-search-box">...</div>
  (Session info: chrome=103.0.5060.134)

Xpath 1

WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '/html/body/div[2]/section/div/main/div/div/div[4]/div[2]/section/a'))).click()

Error: selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <a class="PaginationRow-module__button___QQbMu PaginationRow-module__nextButton___gH3HZ" title="Next page" rel="next">...</a> is not clickable at point (677, 23). Other element would receive the click: <input class="SearchBox-getty-module__input___VMxL0" data-testid="container-search-box-input" placeholder="Search the world’s best photos and images" aria-label="text" name="phrase" autocomplete="off" data-autosuggest-from="https://as.gettyservices.com:443/GettyImages.Autocomplete.KeywordService.Service/KeywordService1/Suggestedkeywords/{0}/{1}/{2}/{3}/{4}?usePopularity=true" value="lfc">

Xpath 2

WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '/html/body/div[2]/section/div/main/div/div/div[4]/div[2]/section/a/div'))).click()

Error : selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <div class="PaginationRow-module__buttonText___XM2mA">...</div> is not clickable at point (673, 9). Other element would receive the click: <div class="SearchBox-getty-module__container___eqbmV" data-testid="container-search-box">...</div>

Xpath 3

WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '/html/body/div[2]/section/div/main/div/div/div[4]/div[2]/section/a/svg'))).click()

Error:  WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '/html/body/div[2]/section/div/main/div/div/div[4]/div[2]/section/a/svg'))).click()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/support/wait.py", line 90, in until
    raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message: 

Xpath 4

    WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '/html/body/div[2]/section/div/main/div/div/div[4]/div[2]/section/a/svg/path'))).click()


Error:     WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '/html/body/div[2]/section/div/main/div/div/div[4]/div[2]/section/a/svg/path'))).click()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/support/wait.py", line 90, in until
    raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message: 

Leave a Comment