wallaby icon indicating copy to clipboard operation
wallaby copied to clipboard

feat: allow to slow down browser actions

Open bagrat opened this issue 1 year ago • 2 comments

For cases mentioned in https://github.com/elixir-wallaby/wallaby/issues/337 and in order to enable the developer to watch their test execute in a comprehensible way while developing, I've added the :slow_down config option to implement that feature.

I'm not sure how to test this automatically, but open for suggestions and recommendations. I've verified this manually.

bagrat avatar Aug 22 '24 21:08 bagrat

Hi! I have a couple questions/comments

Q: Are there any similar features in similar libraries for other languages?

C: this is just implemented in the chrome driver adapter, it would need to be useable for all adapters

C: features like this should be implemented in a way that you can pass the option to start_session, and fall back to app config, then fall back to a default. And in this case, potentially even pass it to individual functions

mhanberg avatar Aug 22 '24 21:08 mhanberg

Hey, thanks for a quick response!

Q: Are there any similar features in similar libraries for other languages?

Yes, I've used them both in Puppeteer and Playwright before, it's called slowMo.

C: this is just implemented in the chrome driver adapter, it would need to be useable for all adapters

Could you possible point me in the right direction where this delay should also be put in?

C: features like this should be implemented in a way that you can pass the option to start_session, and fall back to app config, then fall back to a default. And in this case, potentially even pass it to individual functions

In chrome.ex and selenium.ex?

bagrat avatar Aug 22 '24 22:08 bagrat