2

I am using webdriver JS, which runs on Node js. I just pulled an all-nighter (9 hours) trying all sorts of things to automate a paypal express checkout flow reliably (no flakyness).

To do this, I use the paypal sandbox and literally run a test that automates a purchases and then interacts with the paypal popup window. This requires switching windows, and then once in the window I have to switch into an iframe the login form is nested in, then switch out of that iframe and then switch back to the main window. The entire time I have to wait for various preloaders and the wait times vary wildly.

This step of the test fails constantly, sometimes it seems that selenium can't reliably handle the window + iframe switching reliably - and then sometimes its the paypal sandbox which throws random errors. And then sometimes it just works.

Has anyone else worked with automating the paypal sandbox ui and?

  • I've had to automate the paypal sandbox popup at a job before using Java. It was more brittle than we wanted, but after adding extra conditional waits for all our interactions all the flakiness went away. I've never used the JS bindings, but I have heard others comment that it adds a lot more complexity to tests I believe because of callbacks and promises... – Julian Mar 30 '17 at 22:29
  • I've got automated tests that interact with the paypal sandbox. Mine are written in webdriver.io (a different wrapper around node.js selenium bindings). They are reasonably reliable (I'd say like 95%+ of the time they pass in nightly and regression runs), though sometimes the sandbox will be down, or just unresponsive enough to fail. Are yours regularly failing at any point in particular? – Nat Bowman Nov 10 '17 at 0:28
  • Please clarify the last part of the question to be more answerable. It looks like you may not have finished the system and "has anyone used tool X" is going to be too opinion-based to get good answers. From the rest of the question it does look like you have a more specific question--try to focus the question at the end on that specific question :) . – c32hedge Nov 12 '17 at 19:42
1

Your flakiness seems to be wait related. I would recommend explicitly waiting on every action to be sure an object exists and is ready before interacting with it. The iframe might require refocusing as well as sometimes it's not focused on and results in failures. If the waits don't get you what you want please provide more specific failure situations along with the attempted coded actions so we can dig into the details more.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.