Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

wait untill 2

it('should wait until text has changed', async () => {
    const elem = await $('#someText')
    await elem.waitUntil(async function () {
        return (await this.getText()) === 'I am now different'
    }, {
        timeout: 5000,
        timeoutMsg: 'expected text to be different after 5s'
    });
});
 
PREVIOUS NEXT
Tagged: #wait #untill
ADD COMMENT
Topic
Name
4+5 =