Hello, fellow hackers!<p>3rd attempt to posting something to ShowHN. Learning from my mistakes (and hopefully not making new ones).<p>I'm excited to introduce you to Rayrun extension - a Google Chrome extension that makes the task of developing tests and scraping scripts more efficient.<p>As a web developer, I often myself trying to figure out what is the best CSS selector for a given element. I've tried many tools, but none of them were good enough. So I decided to create my own.<p>Rayrun is a Google Chrome extension that helps you to generate CSS selectors for web elements. It is compatible with popular testing tools like Puppeteer, Playwright, Cypress, and Selenium. With Rayrun, you can effortlessly select web elements, regardless of how nested or complex they may be, and swiftly generate precise selectors.<p>If you are using @playwright/test, Rayrun can also generate Locators (<a href="https://playwright.dev/docs/api/class-locator" rel="nofollow noreferrer">https://playwright.dev/docs/api/class-locator</a>) for you (e.g. `getByLabel('Password')`). You may also use Rayrun to generate XPath selectors (e.g. `//input[@type="submit"]`).<p>For those familiar with the Playwright [codegen](<a href="https://playwright.dev/docs/codegen" rel="nofollow noreferrer">https://playwright.dev/docs/codegen</a>), the Locator output is similar. The main difference is that Rayrun is a Chrome extension, so you can use it from your browser, which is closer to how I work.<p>I believe that Rayrun will be a valuable addition to your web development and testing toolkit.<p>It is my first Chrome Extension so I appologize if you find any glaring mistakes, but please give it a try, share feedback, and I will do my best to address any concerns. I'm here to answer any questions you may have.<p>Quick note regarding privacy: Rayrun does not collect _any_ data, and it has passed an extended audit by Google Chrome Store team.<p>Thank you for your time and happy coding!
Link seems to be down just fyi.<p>For various projects in the past I’ve dabbled in generating selectors so I’m curious what you’ve come up with!<p>My more recent interests have been to find a way to generate more robust selectors that could handle slight-to-mild DOM structure changes (also cannot rely fully on classes, ids, html attributes). This wouldn’t necessarily be for testing but could apply. There are applications that need the ability to find an element despite its location in the dom changing slightly (ie its now nested one div deeper). For instance most xpath or “traverse down the dom until find parent div” type selectors would be too fragile. What i’ve been trying to figure out is a way to “fingerprint” the target element and have a algorithm that has a few ways to look for that element, each failure would try a less strict, more flexible method.<p>Just curious if the work you’ve done ventures into anything like this or if in your research you came across anything like that?
Site is down (I am learning some hard life lesons about DNSSEC)<p>Here is a direct link:<p><a href="https://chrome.google.com/webstore/detail/rayrun/olljocejdgeipcaompahmnfebhkfmnma" rel="nofollow noreferrer">https://chrome.google.com/webstore/detail/rayrun/olljocejdge...</a>
Looks neat. How well does it make "smart" selectors like text contents contains"login" instead of a mess like //a/div[1]/span[3]?