News for hackers. Stuff that matters.
Re:The virtual device farm for rendering websites on multipl... by exyi on Thursday October 22, 2020 @05:51AM (#24856356)
It just seems to be a bunch of iframes and it renders the website in your browser. HTML is just downloaded through CORS proxy...
Re:The virtual device farm for rendering websites on multipl... by mintzworld on Thursday October 22, 2020 @12:42PM (#24860000)
Some websites have a Same-Origin policy that won't allow rendering in an iframe. The CORS proxy lets you bypass the restriction.
Re:The virtual device farm for rendering websites on multipl... by capableweb on Thursday October 22, 2020 @02:06PM (#24861148)
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?
Re:The virtual device farm for rendering websites on multipl... by mintzworld on Thursday October 22, 2020 @02:14PM (#24861276)
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.
Re:The virtual device farm for rendering websites on multipl... by capableweb on Thursday October 22, 2020 @02:25PM (#24861426)
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.
Re:The virtual device farm for rendering websites on multipl... by camillomiller on Thursday October 22, 2020 @03:21AM (#24855649)
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.

Re:The virtual device farm for rendering websites on multipl... by 6510 on Thursday October 22, 2020 @11:01AM (#24858727)
If the bug they suffer is bad enough I just make a page describing the issue and redirect all user agents of the type.
Re:The virtual device farm for rendering websites on multipl... by camillomiller on Thursday October 22, 2020 @11:15AM (#24858909)
I like the passive-aggressive flair of this one.
Re:The virtual device farm for rendering websites on multipl... by LoSboccacc on Thursday October 22, 2020 @03:49AM (#24855793)
> 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

Re:The virtual device farm for rendering websites on multipl... by onion2k on Thursday October 22, 2020 @04:32AM (#24855952)
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

Re:The virtual device farm for rendering websites on multipl... by cedricd on Thursday October 22, 2020 @12:30PM (#24859846)
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

Re:The virtual device farm for rendering websites on multipl... by lpellis on Thursday October 22, 2020 @01:07PM (#24860327)
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...

Re:The virtual device farm for rendering websites on multipl... by Santosh83 on Thursday October 22, 2020 @03:40AM (#24855746)
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?
Re:The virtual device farm for rendering websites on multipl... by Gys on Thursday October 22, 2020 @05:04AM (#24856105)
I had the same problem. My website has no https. How about yours?
Re:The virtual device farm for rendering websites on multipl... by Santosh83 on Thursday October 22, 2020 @05:57AM (#24856387)
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.
Re:The virtual device farm for rendering websites on multipl... by spzb on Thursday October 22, 2020 @07:13AM (#24856804)
Doesn't work for me either.
Re:The virtual device farm for rendering websites on multipl... by anshukg on Thursday October 22, 2020 @05:22AM (#24856206)
It supports only 3 levels of inception, virtual inside virtual inside virtual .
Re:The virtual device farm for rendering websites on multipl... by rhplus on Thursday October 22, 2020 @09:05AM (#24857557)
Tried some sites like https://www.whatismybrowser.com/detect/what-http-headers-is-... and User-Agent is “axios/0.19.2”.
Re:The virtual device farm for rendering websites on multipl... by yboris on Thursday October 22, 2020 @02:11PM (#24861237)
Re:The virtual device farm for rendering websites on multipl... by mintzworld on Thursday October 22, 2020 @02:19PM (#24861354)
"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
Re:The virtual device farm for rendering websites on multipl... by yboris on Thursday October 22, 2020 @02:08PM (#24861187)
Re:The virtual device farm for rendering websites on multipl... by eithed on Thursday October 22, 2020 @07:29AM (#24856898)
How is it different from running Selenium yourself?
Re:The virtual device farm for rendering websites on multipl... by ape4 on Thursday October 22, 2020 @10:49AM (#24858582)
There are many things on the internet you can run yourself - eg calculators.
Re:The virtual device farm for rendering websites on multipl... by FerretFred on Thursday October 22, 2020 @05:22AM (#24856207)
This is really good! Just tried my sites out on it and pleased to say they look consistent.
Re:The virtual device farm for rendering websites on multipl... by Eduard on Thursday October 22, 2020 @09:09AM (#24857593)
The tablet and smartphone incorrectly have hover functionality.
Re:The virtual device farm for rendering websites on multipl... by secondcoming on Thursday October 22, 2020 @11:41AM (#24859220)
twitter.com doesn't support that browser any longer!
Re:The virtual device farm for rendering websites on multipl... by mintzworld on Thursday October 22, 2020 @12:07PM (#24859539)
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.