webdriverio/query-selector-shadow-dom

How do you make sure a radio button is grayed out when the value is not changed ?

alpriya87 opened this issue · 0 comments

Let's says i have a radio button that is grayed out, the test is to make sure that the button is grayed out. Below doesnt return the value since it is expecting some value from the output.

    // check btn was clicked (this page expected btn to change text of output)
    const outputSpan = await page.$("shadow/.output");
    const text = await page.evaluate((output) => output.innerText, outputSpan);
    // prints the text from the output
    console.log(text);

Is there a way to find out if the button is grayed out.

<input _ngcontent-qre-c24="" type="checkbox" id="nonParSelector" class="grv-checkbox grv-margin__left--small" disabled="">
If it is not grayed it looks like this

<input _ngcontent-kof-c24="" type="checkbox" id="nonParSelector" class="grv-checkbox grv-margin__left--small">
Thank you