0

I would like Find_element_by_id on paypal in order to confirm the checkout, but I'm getting an error. I use a working code with webdriver Chrome and Opera:

confirmButton = browser.wait.until(
  EC.presence_of_element_located((By.ID, "confirmButtonTop"))
)
confirmButton.click()

I want to use it with HTMLUnit and PhantomJS, but it doesn't work. I've tried using a different method but nothing:

try:
  WebDriverWait(driver, delay).until(EC.presence_of_element_located(
    driver.find_element_by_id('confirmButtonTop'))
  )
  print "Page is driver!"
except TimeoutException:
  print "Loading took too much time!"

or:

confirmButton = driver.find_element_by_id("confirmButtonTop")
confirmButton.click()

same error :

Unable to locate element with ID: confirmButtonTop

HTML:

<div id="button" class="buttons reviewButton">
  <input track-submit="" type="submit" value="Continuer" id="confirmButtonTop" 
         class="btn full confirmButton continueButton" validate-submit="onPay()">
</div>
thanksd
  • 54,176
  • 22
  • 157
  • 150

0 Answers0