How to add a target in Puppetry

How to add a target in Puppetry


When the test target is not the page, but an element we need to locate it in the DOM. We can do it, for an instance, with DevTools of the Chrome. So we hover over an element on the page right-click on it press “inspect” On the highlighted node we right-click again and pick “Copy selector” or “Copy XPath” Puppetry accepts both Then we add this target to the list in Puppetry Let’s give it some name and copy/paste the selector We’ve done!

Leave a Reply

Your email address will not be published. Required fields are marked *