Ask HN: How do HN webdevs ensure cross-browser support for websites/webapps?

2 points by jexah ↗ HN
Hi all, I'm starting a new project and I was just curious as to when HN thinks the best practices are for automated testing of support for multiple browsers.

Selenium looks interesting, but I want to do a bit more research (as I'd rather avoid replay testing within a browser), and am having trouble finding any alternatives.

Something that came to mind is scanning the code base to look for unsupported JS calls (e.g. `Object.entries`), CSS selectors/properties (e.g. :not(X)), HTML tags and attributes, etc. but I haven't seen anything about this.

I'm sure there are lots of creative solutions, what do you use? Why do you use it? What are the pros and cons?

Thanks.

5 comments

[ 0.16 ms ] story [ 24.9 ms ] thread
You're having trouble finding alternatives, because there isn't really an alternative method. What you call 'unsupported' turns out to be well supported today; this is the reason selenium is so good at this job.
Neither Object.entries nor the File constructor are supported in IE11. WebRTC support was only introduced in Safari 11, for example. As much as I'd like to only have to support modern standards, a large portion of people use outdated browsers. If we assume 10%, we would have to either provide additional support to those customers in the form of helping them download a new browser, or cut them off completely. That's a massive decision.

While I agree that these features are well supported, they're not well enough supported to use carelessly.

Are those "large portion of people" your customers? If not, they don't matter.

IE11 in general does not matter.

Use statistics to make decisions about feature adoption, do not generalize or guess... that's a straw man that'll burn in a meeting.

Apparently yes, they are. That was the reason I raised the question. Anybody with access to a phone or computer is a potential customer, and we've had IE11s and Safari 10s walk past. If you'd like another example, look at native date pickers. Safari 11 still doesn't have one.
Something that has helped me is using my own device farm for my top target devices and AWS device farm due to the large amount of supported devices: https://aws.amazon.com/device-farm/ along with using Robot Framework and Xcode or Android/JetBrains software for deeper debugging and testing for full automation as I just do not have the time to do stuff manually anymore.