9 ms·
Show HN: Helium – Lighter web automation based on Selenium
- captainmarble 7y agoWhy can't it directly use chrome devtools protocol?
- eindiran 7y agoThe reason why it doesn't use the Chrome DevTools Protocol is that it (Helium) is a wrapper around Selenium WebDriver [0]. One advantage of wrapping WebDriver, rather than using something like the Chrome DevTools Protocol, is that WebDriver has an interface specified by an W3C Standard [1] [2], and can be implemented for any browser. The Chrome DevTools Protocol (obviously) only works with browsers based on Chrome. [0] https://www.selenium.dev/documentation/en/webdriver/ https://www.selenium.dev/documentation/en/webdriver/ [1] https://www.w3.org/TR/2018/REC-webdriver1-20180605/ https://www.w3.org/TR/2018/REC-webdriver1-20180605/ [2] https://github.com/w3c/webdriver https://github.com/w3c/webdriver
- emmanueloga_ 7y agoApparently the reason one would keep using selenium over headless chrome (perhaps using a wrapper like puppeteer [1]) is that selenium works over many different browsers, not just chrome. "WebDriver can be used with all major browsers. Automate real user interactions in Firefox, Safari, Edge, Chrome, Internet Explorer and more!" [2] 1: https://github.com/puppeteer/puppeteer https://github.com/puppeteer/puppeteer 2: https://www.selenium.dev/projects/ https://www.selenium.dev/projects/
- jschwartzi 7y agoOh, hey, I basically started writing something exactly like this when I started using Selenium to script some test cases.
- pintxo 7y agoSame here. As a lot of the Selenium API is quite low-level (speaking about the Java variety). Would be wonderful if this and similar efforts would end up in the core Selenium project, keeping the low-level options, but providing an easier to use layer on top.
- edoceo 7y ago+1 on this boat, php-webdriver (nee Facebook WebDriver) where waiting, some sendkeys magic, clickAndWait should always be present.
- thangalin 7y ago+2, about six years ago now. https://bitbucket.org/djarvis/scripted-selenium/wiki/Home https://bitbucket.org/djarvis/scripted-selenium/wiki/Home The video shows a script running itself. https://www.youtube.com/watch?v=tGvcm0Rlm-0&hd=1 https://www.youtube.com/watch?v=tGvcm0Rlm-0&hd=1
- eindiran 7y agoVery cool project OP: it looks like it gets rid of the major pain points I've had with Selenium. In particular, smarter handling of iframes and the better explicit waits are huge wins over vanilla Selenium. I'm glad you decided to release this, especially since you chose to use a permissive license.
- ng12 7y agoHas anyone had rousing success with automation tests like this? I almost always find the ratio of maintenance to issues caught to be unacceptably high, especially when compared to simple unit tests.
- l0b0 7y agoAs much as I love unit tests (being simpler and running more than 1000 times faster than web tests) there is a place for basically all types of tests in a CRUD application. 100% unit test coverage isn't going to help you if you can't actually spin up the whole system and serve requests over high-level protocols. It's all about ROI, and ROI is huge for simple high-level smoke tests.
- freeone3000 7y agoMy experience with selenium is that the tests broke more often than the UI, whether through timing issues, DOM changes, or framework changes. The binding is on a layer that humans don't see, and it makes it fragile.
- jdc 7y agoAt this point I might do it for greenfield work.
- joshstrange 7y agoThis was my experience to a a T but then we hired a guy to solely manage the tests instead of having the developers do it and his tests caught a few false positives at the start but over time we were able to eliminate a 2-day+ crawl over the site by QA and UAT. My takeaway from this (which was the same argument I made back when we were failing at producing anything even usable let alone reliable) is: It needs to be someone's sole goal and I'll go a step further and say they should be on the outside of the team developing the main app. Being too close to the underlying code makes for a bad QA/Automated Tester IMHO. I have no problem even being the person who is managing/writing the tests but it's very hard to do both in my experiance.
- WalterBright 7y agoPretty soon people are going to run out of elements to name their products after. Naming things after letters in the alphabet is a better strategy.
- ivan_ah 7y ago@mherrmann What would be the comparison / difference with SeleniumBase https://github.com/seleniumbase/SeleniumBase https://github.com/seleniumbase/SeleniumBase ? I'm always on the lookout for browser automation using Python so excited to try this framework. I was a big fan of https://github.com/miyakogi/pyppeteer https://github.com/miyakogi/pyppeteer but it doesn't seem to be maintained anymore. There is another project by microsoft called playwright, though it's js-only for now. They don't have plan for Python bindings for now https://github.com/microsoft/playwright/issues/1043 https://github.com/microsoft/playwright/issues/1043
- snowl 7y agoI don't see people talk about TestCafe which is open source and is an actual alternative without being dependent on WebDriver at all
- RexM 7y agoI haven’t personally used it, yet, but my team has been really happy with TestCafe. The tests seem much less flakey than selenium.
- wpietri 7y agoI really appreciate the frankness in the paragraph that starts with this: "I have too little spare time to maintain this project for free. If you'd like my help, please go to my web site to ask about my consulting rates." I hope drawing a clear boundary like that reduces some of the entitled nonsense that can happen around open-source projects.
- rumanator 7y ago> I hope drawing a clear boundary like that reduces some of the entitled nonsense that can happen around open-source projects. Case in point: Rust's actix web https://www.theregister.co.uk/2020/01/21/rust_actix_web_framework_maintainer_quits/ https://www.theregister.co.uk/2020/01/21/rust_actix_web_fram... https://www.reddit.com/r/rust/comments/epoloy/comment/feksq2i https://www.reddit.com/r/rust/comments/epoloy/comment/feksq2... Regardless of where you are on the soundness telenovela, the fact that a lot of the FLOSS project consumers felt entitled to demand access to a well maintained project for free and complained that even forking a project is not a valid option because they expect someone else to spend their personal time to benefit them personally is an attitude that boggles the mind.
- lmilcin 7y agoI also think this a good idea. There are companies that are willing to pay millions for extremely ineffective development, asking the designer/creator of the product for couple of hours or days of help has much higher chance of success in terms of return on investment.
- lqs469 7y agoThat reminds me of this: https://news.ycombinator.com/item?id=22374991 https://news.ycombinator.com/item?id=22374991 Those tools perhaps will be useful for automated testing or accessibility, etc.
- asimjalis 7y agoWhat’s the relationship between Helium and HeliumHQ? They look like similar products. https://heliumhq.com/ https://heliumhq.com/
- mherrmann 7y agoHeliumHQ used to be the commercial offering of Helium. We shut down that company at the end of 2019. The GitHub link you see here now is the same code, modernized and open sourced. See the history section at the bottom of the GitHub README.
- asimjalis 7y agoWhy didn’t the commercial offering succeed?
- mherrmann 7y agoDevelopers don't like to pay for software libraries so it was an uphill battle. My co-founder (our "COO") moved on because he got a very lucrative offer. I wanted to buy out his 50% of the business, he asked for a 40x multiple of yearly revenue. (For context, online businesses usually go for 2-3x.) In this stalemate, I did not want to continue growing the business with him owning 50% of it. Now that revenue has, through years of inactivity, died down to essentially 0, he agreed to let me open source it.
- dvfjsdhgfv 7y agoHas anyone managed to log in to Facebook or Instagram using it?
- lorey 7y agoAFAIK Selenium is easily recognizable as it inserts itself in the DOM, so I would guess that they will block you pretty quickly. If you're interested: https://stackoverflow.com/questions/33225947/can-a-website-detect-when-you-are-using-selenium-with-chromedriver https://stackoverflow.com/questions/33225947/can-a-website-d...
- dvfjsdhgfv 7y agoOK so I did a few tests with FB, using an existing account data and managed to change status without getting banned. Will continue testing as it would be a very convenient way to post status updates without having to actually use FB.
- zabil 7y agoThis is great news, especially for Selenium users. Helium is a great tool.
- vadiml 7y agoI've been using SiculiX for GUI testing.... It has GUI and OCR, i wonder if helium could be in SiculiX scripts
- jfax 7y agoThis appears to be very similar to Capybara in Ruby, which I've used extensively. I was under the impression that implementations of Selenium were as high-level as this every language.
- PopeDotNinja 7y agoThe nice thing about Capybara and other "in stack" tools is you have tight integration with the database, so setting up test data and resetting it is easy. And for the tests that don't require JavaScript, the tests can still be made to run quite fast.
- keva161 7y agoI created a blog post on this: https://kevintuck.co.uk/browser-automation-with-hellium/ https://kevintuck.co.uk/browser-automation-with-hellium/ Great little tool!
- mherrmann 7y agoAwesome, thanks!