0

I am currently running a script on a Shopify website, kith.com. I am trying to auto-checkout a certain item. What I am doing is I am getting the cart link and then opening it with selenium, automatically entering necessary details to complete the order.

I have ran into an issue, though.

I am able to get through the customer information page and the shipping method page; automatically entering details with selenium. The issue I am running into, is when I get onto the Payment method page. Whenever I try to insert the payment details such as credit card info, etc. it gives me an error: no such element: Unable to locate element.

I am currently searching the element through ID, but I don't understand why it's not being read, because it has worked for all the previous pages.

  • Inspect and make sure the id is really there (run some js with get_element_by_id) – whackamadoodle3000 Jan 28 '18 at 05:47
  • yeah, im getting the ID from inspecting it, and yet its saying it can't read it. Mabey I'm not getting the correct ID? if so, I don't know where to find it. – Joe Cranney Jan 28 '18 at 05:48
  • Just throwing out ideas -- there is a wait for element option, perhaps you are asking for it too soon? Also, I'd add logging (pygogo) and capture my browser.info just before making my call, or inside my exception. See if you can find the id at that point in your html. Finally, if it is in an iFrame, you have to treat it differently. – SteveJ Jan 28 '18 at 05:55
  • Possible duplicate of [NoSuchElementExeption, selenium unable to locate element](https://stackoverflow.com/questions/48471321/nosuchelementexeption-selenium-unable-to-locate-element) – undetected Selenium Jan 28 '18 at 12:07
  • @SteveJ yes, there is an iFrame, what do I need to do differently with them? thanks! – Joe Cranney Jan 28 '18 at 15:34
  • Search for "switch to frame", there are a bunch of SO hits for it. – SteveJ Jan 28 '18 at 16:34
  • Try using js in selenium – whackamadoodle3000 Jan 29 '18 at 00:47
  • Possible duplicate of [Selenium and iframe in html](https://stackoverflow.com/questions/18924146/selenium-and-iframe-in-html) – JeffC Jan 29 '18 at 19:21

0 Answers0