Chromeless : while exists loop syntax

94 Views Asked by At

I would like to execute a piece of code as long as an element still exists in the DOM, but I can't find the correct syntax in Chromeless. Something like:

while (await chromeless.exists('div#ready')) {
    //// code
}

Can I use Chromeless to do that or do I need to use .evaluate somehow?

1

There are 1 best solutions below

0
Sulli On

For some reason the code I posted above now works. The correct syntax is thus:

while (await chromeless.exists('div#ready')) {
    //// code
}