zenstruck / browser

A fluent interface for your Symfony functional tests.
MIT License
186 stars 17 forks source link

Question: Introspect/pause the browser by an error #99

Open Chris53897 opened 2 years ago

Chris53897 commented 2 years ago

Is it possible to configure the PantherBrowser that it introspects/pause the browser by an error?

Example: ->click('#form_wrong_id')

Actual Behaviour:

The Browser closes and an error will be shown. Clickable element "#form_wrong_id" not found.

I insert a pause() command before the line and fix the selector. Delete the pause() command. Check if it works and repeat the steps until it works.

Desired Behaviour:

Set an optional option (default: false) $this->pantherBrowser(['SET_OPTION_PAUSE_BY_ERROR'] => true)

If an error will rise, it starts the introspection-Mode and give some Feedback about the error. So i do not need add/remove the pause() function all over.

kbond commented 2 years ago

Is it possible to configure the PantherBrowser that it introspects/pause the browser by an error?

Not currently but seems like a good feature - I think this should be possible.