You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I managed to set a custom screenshot using the Playwright driver and library, so whenever I call the function "gauge.screenshot()" in a step, or on test failure, it takes a full page screenshot and adds it to the report.
However, I would like to have a function like "gauge.elementScreenshot(locator)" or "locator.getScreenshot()" that only takes the webelement screenshot (using the dedicated playwright function) but most importantly, adds it to the Gauge HTML report.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all
I managed to set a custom screenshot using the Playwright driver and library, so whenever I call the function "gauge.screenshot()" in a step, or on test failure, it takes a full page screenshot and adds it to the report.
However, I would like to have a function like "gauge.elementScreenshot(locator)" or "locator.getScreenshot()" that only takes the webelement screenshot (using the dedicated playwright function) but most importantly, adds it to the Gauge HTML report.
Any idea on how to achieve that in JavaScript?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions