Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

khabib0460's avatar

Don't clikc on buttons again in test. In Javascript.

When I run my test first time, it turns on some buttons in editor mode, and then in the next run it turns it down, so test fail next run. How can I write function in Javascript which says if the buttons are on https://vidmate.bid/ , don't click it on them again?

0 likes
1 reply
automica's avatar

Why not write a step at the end of your test that resets the button state so that your next run it can be pressed again?

Tests should be repeatable and do the same thing every time.

Share some code if you want more assistance

Please or to participate in this conversation.