Live data from Hacker News

Ask HN: Would you be interested in POM generator for Selenium?

news.ycombinator.com

11–20 of 35 posts

Re: Ask HN: Would you be interested in POM generator for Selenium?

#11
post #6
post #2

POM = Page Object Model[1] [1] https://www.browserstack.com/guide/page-object-model-in-sele...

Why would someone not spell that out in the title, I wonder.

I'm wondering why people would want the Project Object Model for Java.

Re: Ask HN: Would you be interested in POM generator for Selenium?

#12
post #9
post #4

Given that I don’t know what this is, and that Selenium’s API is well-known to promote flakey tests (it’s flakey by default and needs layers of abstractions to add waits, delays, etc), I’d stay away.

Aren't all E2E test frameworks flaky by default? When you're testing the end user experience that goes through multiple layers of services, I think that should be expected. Would love to learn from your experiences on any better frameworks you might have used, though!

Yeah, Selenium is pretty flakey. I've been pretty happy with https://playwright.dev . Kind of the successor of puppeteer. At least, some of the same devs went from Google to MS. Here's an example where MS has better cross-browswer support than Google.

Re: Ask HN: Would you be interested in POM generator for Selenium?

#13
post #10
post #9

Earlier quoted context omitted.

Aren't all E2E test frameworks flaky by default? When you're testing the end user experience that goes through multiple layers of services, I think that should be expected. Would love to learn from your experiences on any better frameworks you might have used, though!

We’re using Hurl [1] at work for integration tests with very good success. We’ve eliminated false positive or flacky tests: it’s a simple tool that runs HTTP requests and you can add asserts on responses. It’s as if you would test your app with curl, very fast and reliable. On the other hand, contrary to Selenium, there is no Javascript engine so you can only test the “raw” DOM or json response sent by the network (a…

Seems hurl is quite a different thing than browser automation though?

API/request level testing is great when appropriate, but testing what happens in browser won't be possible without using something like selenium, nightwatch or playwright

Re: Ask HN: Would you be interested in POM generator for Selenium?

#14
post #10

Earlier quoted context omitted.

We’re using Hurl [1] at work for integration tests with very good success. We’ve eliminated false positive or flacky tests: it’s a simple tool that runs HTTP requests and you can add asserts on responses. It’s as if you would test your app with curl, very fast and reliable. On the other hand, contrary to Selenium, there is no Javascript engine so you can only test the “raw” DOM or json response sent by the network (a…

Seems hurl is quite a different thing than browser automation though? API/request level testing is great when appropriate, but testing what happens in browser won't be possible without using something like selenium, nightwatch or playwright

Yes totally.

On the other hand, you can also easily test use cases where the browser is “helping” you (for instance, you want to test that your backend didn’t accept an invalid email, but your HTML form has HTML5 validation that prevents a user to enter an invalid email). Or you want to test HttpsOnly cookie attributes. But it can’t do UI integration tests.

Re: Ask HN: Would you be interested in POM generator for Selenium?

#15

For selenium? No absolutely not in fact I would happily pay someone to not add to the horror that is selenium. I would however be interested in a POM generator for Cypress or Web Driver.

So is really Cypress/Puppeteer/Playwright much more stable than Selenium.

I still think any E2E test tooling will have the same issues and be simply horrible.

Re: Ask HN: Would you be interested in POM generator for Selenium?

#16
post #9
post #4

Given that I don’t know what this is, and that Selenium’s API is well-known to promote flakey tests (it’s flakey by default and needs layers of abstractions to add waits, delays, etc), I’d stay away.

Aren't all E2E test frameworks flaky by default? When you're testing the end user experience that goes through multiple layers of services, I think that should be expected. Would love to learn from your experiences on any better frameworks you might have used, though!

No not all e2e frameworks are flakey. Cypress allows you to intercept network calls with ease. The same can be done in Playwright as well.

Re: Ask HN: Would you be interested in POM generator for Selenium?

#17
post #15

For selenium? No absolutely not in fact I would happily pay someone to not add to the horror that is selenium. I would however be interested in a POM generator for Cypress or Web Driver.

So is really Cypress/Puppeteer/Playwright much more stable than Selenium. I still think any E2E test tooling will have the same issues and be simply horrible.

Yes, way more stable. At least cypress, I don't have much experience with playwright. We never had an issue regarding brittleness or stability. We do, however, get sometimes frustrated over certain API choices, like the way sessions and cookies are managed and how hard it is to keep a value throughout a test suite etc.

Re: Ask HN: Would you be interested in POM generator for Selenium?

#18
I would absolutely pay for this, but only if it could work with web applications built in React. React generates CSS class/ID names, some of which are duplicates. This requires determining convoluted XPATHs which can very easily, and often do, change in ways that immediately break the pre-defined locators. I’m aware of using unique attributes to make elements easier to locate, but that often requires someone else’s buy-in which isn’t always a guarantee. Even having a way to run the application in a headless browser and generating the POM programmatically would be great.

Re: Ask HN: Would you be interested in POM generator for Selenium?

#19
post #4

Given that I don’t know what this is, and that Selenium’s API is well-known to promote flakey tests (it’s flakey by default and needs layers of abstractions to add waits, delays, etc), I’d stay away.

Cypress completely solved flakey UI tests for me. I used Selenium for years but would never go back now.

Re: Ask HN: Would you be interested in POM generator for Selenium?

#20
A long time ago, I worked on my Page Object Generator pet project, a desktop app allowing me to record/test page elements via Selenium Webdriver. https://github.com/dzharii/swd-recorder

It was a time when I had to test an IE6-only enterprise web tool, And there was no option to copy CSS-selector in Chrome/Firefox. I am not working in UI automation anymore (sad :( ) and lost interest in this project, but I think having a tool to record page objects and generate some smart automation code can still be quite helpful.

Post reply on HN