title: How to click on Continue Checkout gif element on webpage using Selenium and Python?
body: <p>I am trying to do a tutorial and learn Selenium in python however I cant seem to get Selenium to click the gif for continue checkout, I dont think you will be able to see the page unless you create an account etc so I will paste the html code in below</p>
  <p><strong>I am using:</strong></p>
  <ul>
  <li>Python v3.9</li>
  <li>Chrome v87</li>
  </ul>
  <p>This is the URL i am practicing on:</p>
  <p><a href="https://www.aria.co.uk/myAria/ShoppingBasket" rel="nofollow noreferrer">https://www.aria.co.uk/myAria/ShoppingBasket</a></p>
  <p>Selenium code:</p>
  <pre><code>from selenium import webdriver
  from selenium.webdriver.common.keys import Keys
  from selenium.webdriver.common.by import By
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.support import expected_conditions as EC
  from selenium.webdriver.common.action_chains import ActionChains
  
  import time
  
  # Open Chromedriver
  driver = webdriver.Chrome(r&quot;C:\Users\Ste1337\Desktop\chromedriver\chromedriver.exe&quot;)
  
  # Open webpage
  driver.get(&quot;https://www.aria.co.uk/SuperSpecials/Other+products/ASUS+ROG+Pugio+2+Wireless+Optical+RGB+Gaming+Mouse?productId=72427&quot;)
  #https://www.aria.co.uk/Products/Components/Graphics+Cards/NVIDIA+GeForce/GeForce+RTX+3060+Ti/Palit+GeForce+RTX+3060+Ti+Dual+8GB+GPU?productId=73054
  
  # Click &quot;Add to Basket&quot; or refresh page if out of stock
  try:
      element = WebDriverWait(driver, 1).until(EC.presence_of_element_located((By.XPATH, &quot;Out of Stock!&quot;)))
      time.sleep(5)
      browser.refresh()
  except:
      button = driver.find_element_by_id(&quot;addQuantityButton&quot;)
      button.click()
  
  # Click basket
  basket = WebDriverWait(driver,10).until(EC.element_to_be_clickable((By.ID, &quot;basketContent&quot;)))
  basket.click()
  
  # Click checkout
  WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, &quot;//img[contains(@src,'/static/images/checkoutv2.png')]&quot;))).click()
  
  # Login to account
  login = WebDriverWait(driver,10).until(EC.element_to_be_clickable((By.NAME,&quot;login[email]&quot;)))
  login.send_keys(&quot;testuser@hotmail.co.uk&quot;)
  login.send_keys(Keys.TAB)
  driver.implicitly_wait(1)
  passwrd = driver.find_element_by_xpath(&quot;/html/body/div[4]/div[1]/div[2]/form/div/h1/div[3]/div/div/input[2]&quot;)
  passwrd.send_keys(&quot;password&quot;)
  driver.implicitly_wait(1)
  login.send_keys(Keys.ENTER)
  
  # Click continue checkout
  WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, &quot;//input[contains(@src,'/dynres/YnV0dG9uX3NtYWxsLm1lZGl1bQ==/Q29udGludWUgQ2hlY2tvdXQ=.gif')]&quot;))).click()
  </code></pre>
  <p>HTML Code of the gif i need to click</p>
  <pre><code>&lt;input type=&quot;hidden&quot; name=&quot;addressID&quot; value=&quot;940342&quot;&gt;
  &lt;div style=&quot;text-align:right; margin-top:10px;&quot;&gt;
      &lt;input id=&quot;formSubmit&quot; class=&quot;gaTrackedEvent&quot; class=&quot;gaTrackedEvent&quot; data-ga_event_category=&quot;checkout&quot; data-ga_event_action=&quot;click_continue&quot; data-ga_event_label=&quot;deliverydetails&quot; type=&quot;image&quot; src=&quot;/dynres/YnV0dG9uX3NtYWxsLm1lZGl1bQ==/Q29udGludWUgQ2hlY2tvdXQ=.gif&quot; value=&quot;Continue Checkout&quot;&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>