You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you initialize Ferrum with a window size using remote browserless 2 - the window size is applied, but the viewport is not updated automatically. The DOM is rendered in a 800x600 frame, even if the browser window is set to 1900x1080.
I'm not sure if it's a bug or expected behavior, just leaving this here for reference. The workaround to utilize the full viewport is easy:
But I had to explicitly add this, to use the full window.
Expected behavior:
The viewport is automatically extended to the window size given when initializing Ferrum. Did not have the issue when using a local chromium, this appeared after switching to browserless 2.
For reference:
The text was updated successfully, but these errors were encountered:
require'ferrum'# using local chromiumbrowser=Ferrum::Browser.newwindow_size: [1920,1080]browser.viewport_size=>[1920,993]# using browserless 2 via ws connectionbrowser=Ferrum::Browser.newwindow_size: [1920,1080],ws_url: 'ws://chrome:3000?token=XYZ'browser.viewport_size=>[800,600]
And something seems to be resetting it back to 800, 600
However, there seems to be a way to change the default viewport in browserless, by passing launch options to the ws_url. This did the trick for me eventually:
If you initialize Ferrum with a window size using remote browserless 2 - the window size is applied, but the viewport is not updated automatically. The DOM is rendered in a 800x600 frame, even if the browser window is set to 1900x1080.
I'm not sure if it's a bug or expected behavior, just leaving this here for reference. The workaround to utilize the full viewport is easy:
But I had to explicitly add this, to use the full window.
Expected behavior:
The viewport is automatically extended to the window size given when initializing Ferrum. Did not have the issue when using a local chromium, this appeared after switching to browserless 2.
For reference:
The text was updated successfully, but these errors were encountered: