Rayrun
← Back to Discord Forum

Is there an easy way for me to get the locator given an element on the page?

champagne_papadposted in #help-playwright
Open in Discord
champagne_papad

Given a focused element, I would like to get the locator for that element. I know codegen supposedly does it (I haven't tried it yet, but the docs seem to say so), but I was wondering if this logic is abstracted out in some utility or library?

This thread is trying to answer question "Is there a utility or library that can provide the locator for a focused element on a webpage, separate from the 'codegen' tool?"

1 reply

Would suggest use the codegen or vs code plugin.

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].