Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
The virtual device farm for rendering websites on multiple devices (seleniumbase.io)
104 points by seleniumbase on Oct 22, 2020 | hide | past | favorite | 27 comments


It just seems to be a bunch of iframes and it renders the website in your browser. HTML is just downloaded through CORS proxy...


Some websites have a Same-Origin policy that won't allow rendering in an iframe. The CORS proxy lets you bypass the restriction.


But this is a tool for development. So if you're loading up a site for development, don't you work on that site and can control the Same-Origin policy?


It's possible to be testing a live version of your own site when you can't easily change the Same-Origin policy for just yourself.


Not sure if people still do the "upload PHP file automatically to production server via FTP on save" way of development. Most web developers I know run servers locally for development, where you can easily set your own headers and/or meta tags.


Nice. But there will always be that client browsing on a corporate install of Internet Explorer that will complain about an obscure bug. In that case, avoid any bickering and counterstrike surgically with a well written and sourced explanation on why their browser is a safety risk for the entire company and that the problem should be escalated quickly to IT because that’s much more worrying than a simple website bug most people’s browsers won’t display. Attach a couple of links to layman-friendly articles about Explorer not being considered a browser anymore even by Microsoft (it’s officially a “legacy solution”) and send.

I did it a few times and each and every time I had follow ups thanking me, telling me how much they hated Explorer but they were forced to use it, and that they didn’t know about the risks of using it.


If the bug they suffer is bad enough I just make a page describing the issue and redirect all user agents of the type.


I like the passive-aggressive flair of this one.


> you no longer need random time.sleep()

you never needed that, selenium always had multiple method available to wait for page loads or to wait for specific div to become available in the dom or visible in the viewport.

anyway, I don't understand the usefulness of a mobile web render into a browser: a tall, narrow frame is no substitute of a mobile device. for one the rendering engine is not the same, secondly you don't get touch events generated for it, thirdly hover and pixel density media queries straight up won't work


Selenium can use Chromedriver's device emulation mode (eg "add_experimental_option("mobileEmulation", {"deviceName": "iPhone X"})") to enable touch events, pixel density, etc. It's not the same as testing on a real device but it's still useful to have as part of a test pipeline if you don't have the budget for every device you need to test on.

https://chromedriver.chromium.org/mobile-emulation


Interesting. It breaks on my site. https://seleniumbase.io/devices/?url=www.narrator.ai

Tried again and now it doesn't load. Maybe I'll try later. Looks cool though


It looks like it is just loading the pages in an iframe (through a proxy). It would be more useful if it at least set the user agent, should be easy enough to add.

I built a tool that does something similar, here is your site: https://app.pagewatch.dev/62189ac2393594d963561b5426c1215055...


I tried opening my test site and it was displayed without CSS styles or images. Could this be because I have a restrictive content security policy set?


I had the same problem. My website has no https. How about yours?


It does via Cloudflare. But another site with https seems to load okay. I'm at work now but will test later with the CSP header disabled.


Doesn't work for me either.


It supports only 3 levels of inception, virtual inside virtual inside virtual .


Tried some sites like https://www.whatismybrowser.com/detect/what-http-headers-is-... and User-Agent is “axios/0.19.2”.



"Service workers can only be used over HTTPS, or on localhost for development" - That's a known Gatsby issue: https://github.com/gatsbyjs/gatsby/issues/10369



How is it different from running Selenium yourself?


There are many things on the internet you can run yourself - eg calculators.


This is really good! Just tried my sites out on it and pleased to say they look consistent.


The tablet and smartphone incorrectly have hover functionality.


twitter.com doesn't support that browser any longer!


There are a few websites that will detect unusual behavior from browsers living inside of browsers. Although it does seem to work for most websites.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: