ScreenPyHQ / screenpy

Screenplay pattern base for Python automated UI test suites.
MIT License
27 stars 3 forks source link

Add `Stop` Action. #142

Closed perrygoy closed 3 months ago

perrygoy commented 4 months ago

I've been using Serenity/JS recently at work and the Wait function over there allows you to pass in a Question and Expectation. That feels super nice and natural! I like it!

... but we already use Wait to mean something very specific over in screenplay-selenium, to map to the WebDriverWait class's toolkit. I don't want to make false-friends with that.

So, let's have a new Action, Stop, which takes a Question and Resolution and tells the Actor to stop until it's true (or a timeout)!

I think you could also do the_actor(Stops()) to do something similar to Debug but just waits for the user to hit enter to continue.