Skip to content Skip to sidebar Skip to footer

Chrome Webdriver Unable To Complete Product Checkout Automation

I am attempting to automate the checkout of a product on this website. However, at the very last step when a button is supposed to be clicked to submit the payment, the button just

Solution 1:

If you are facing problem with the order on the mentioned site then please make sure that site do not have different behavior while you do checkout with the same details, manually.

While i have tried guest user checkout on same site i have faced connection timeout error in below API

POST https://www.converse.ca/braintree/checkout/quoteTotal/ net::ERR_CONNECTION_TIMED_OUT

Which causing that spinner continue rolling.

If there is element specific issue then you can handle that. Best usecase for the placing order are

While it lands on Order Review section you have to use explicit wait condition whether place or button is ready. refer below code

from selenium.webdriver.support.uiimportWebDriverWaitfrom selenium.webdriver.supportimport expected_conditions asECWebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.CSS_SELECTOR, "button[title='Place Order']")).click()

And then wait until spinner goes away to make sure order has been completed.

WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.ID, "review-please-wait"))

NOTE : Make sure your waiting time is sufficient for each section until info get loaded because there are some API call at the time you select some option. So it can cause your script failure because your script is fine but system is not ready.

Solution 2:

Did you used find_element_by_xpath()? In this case, give some implicit waiting time to get all the web resources. For example,

driver = wevdriver.Chrome()
driver.implicitly_wait(3)
driver.find_element_by_xpath().click()

Post a Comment for "Chrome Webdriver Unable To Complete Product Checkout Automation"