magic_test
magic_test copied to clipboard
Log accept alert
Is there a way to accept alert and log that in the file? If not we can start to think on how to solve that.
This is a little bit complicates probably because I think we don't have an event to log that so we need think other ways to solve it. Thinking out-loud I think we can check if the element clicked is a link or a button with a data-confirm
or data-turbo-confirm
and if those are present we can assume that the alert is involved and wrap the code in a accept_alert
.
Linking #1 here for future reference.
Maybe we could use a keybinding (similar to how we generate assertions with Ctrl
+ Shift
+ A
) to start the accept_alert
block, perform whatever actions we want to exist in it, and then do the same keybinding to end the block.