I am evaluating Puppeteer library to replace Selenium, the porting was quite straight forward until I started to test Checkbox.
I need to get the checkbox’s state, and in Selenium it was quite simple:
${IsChecked}= Selenium2Library.Get Element Attribute ${Xpath} aria-checked
The attribute returns as it seen the the page true/false
While same request is Puppeteer returns None
${IsChecked}= PuppeteerLibrary.Get Element Attribute ${Xpath} aria-checked
The documentation for PuppeteerLibrary is quite poor, and I cannot find enough users posting on this library.
Puppeteer is based on Node JS, just like Browser Library, and the Puppeteer Library uses playwright for Firefox and Webkit support as Puppeteer only supports chrome.
From a quick look over the site I can’t see how this provides any benefits over Browser Library?
From the documentation it looks like you have the syntax correct
In your HTML does the aria-checked attribute have a value or is it like the checked attribute on a standard html form <input> where it’s the when checked and removed when unchecked? If there is no value this might be where you are encountering the issue?
Perhaps contact the qahive team and ask them to join this forum?
@Guto You can beter use Browser Library which is based on Playwright, instead of the Puppeteer library. Playwright was developed by the same people that created its predecessor, Puppeteer. Playwright is built and maintained by Microsoft.