I am having the code as given below:
let btns = await page.$$(".move-to-preview-env");
let addToRepl = await btns[0];
let moveBtn = await btns[1];
console.log('addtoRepl ', addToRepl) // I want to check if these buttons are enabled or disabled ??
console.log('moveBtn ', moveBtn)
I also tried this:
let btns = await page.$$('button[disabled]')
let btn1 = await btns[0].disabled;
let btn2 = await btns[1].disabled;
console.log('btns ', btns) // giving array of element handle
console.log('btn1', btn1) // giving undefined ???
Whereas I tried this in the browser console and giving correct result:
let ele = document.querySelectorAll('button[disabled]');
ele[0].disabled // true
But not getting disabled/enabled property using puppeteer.