7
Views
2
Comments
Webdriver IO Issue
Question

I'm a QA automation tester working on Webdriver IO, during automation after scrolling in the page web page am able to new elements are getting loaded. I can click those elements in console option E.g  

document.querySelector('button[data-testid=Add]').click()

But if I use the same in the browser.execute it it not working like this 

await browser.execute("document.querySelector('button[data-testid=Add]').click()");


2024-05-08 06-29-37
Prince Aadil Khan Panwar

Hi Manoj,

appreciate your interest in finding a solution for your technical challenge. However, please note that the OutSystems forums are dedicated to discussing topics related to the OutSystems platform. If you have any questions or need assistance with OutSystems, feel free to ask, and the community will be happy to help. 

Regards,

Prince

2019-01-07 16-04-16
Siya
 
MVP

It's possible that the element isn't fully loaded when you try to click it using browser.execute("document.querySelector('button[data-testid=Add]').click()"); You may try with await browser.waitForClickable for the elements to load.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.