Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

[Standup][SG] 2011-11-25 – Wonkiness with accepting an alert dialog in cucumber


“We are using page.driver.browser.switch_to.alert.accept in our cucumber steps in order to accept a JavaScript alert box. This appears to have an effect on the browser’s behavior afterward, causing future scenarios to fail when they pass on their own. We’re seeing timing issues, specifically around when the blur event is called when an input field loses focus. We didn’t manage to find the root cause. Any ideas?”

  • Sounds intense! No answers, though.


  • It’s not possible to stub a delegated method; stub it on the object
    delegated to instead.

  • In order to get an accurate number of days since the epoch, do this:
    ( / 60 / 60 / 24).round. The key here is the to_f
    instead of to_i to prevent losing precision early on.

Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *