Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

waitfordisplayed

it('should detect when element is visible', async () => {
    const elem = await $('#elem')
    await elem.waitForDisplayed({ timeout: 3000 });
});
it('should detect when element is no longer visible', async () => {
    const elem = await $('#elem')
    await elem.waitForDisplayed({ reverse: true });
});
Source by webdriver.io #
 
PREVIOUS NEXT
Tagged: #waitfordisplayed
ADD COMMENT
Topic
Name
5+8 =