To be honest, I'm new in automation js and nightwatchjs, but there is the problem with creating a loop in nightwatchjs. The task is to click on the button while an element is not visible, it can become visible at random after clicking. So, I'm struggling with the problem, how to add while loop in code in nightwatchjs, because my vision how to solve this problem is a loop, for example:
while(check for element)
.click('[Our_Button]')
And I tried to use this nightwatch js while loop but doesn't help, it was an error "Error while running clickUntilNotVisible command: browser.waitUntil is not a function" Maybe it is possible to use better way without the loop, but I didn't find anything.