rubycdp / cuprite

Headless Chrome/Chromium driver for Capybara
https://cuprite.rubycdp.com
MIT License
1.24k stars 93 forks source link

Viewport not resizing #269

Open adrianthedev opened 3 months ago

adrianthedev commented 3 months ago

Hey 👋

I have this issue with cuprite tests which I don't think we had before.

It seems that the webpage does not resize with the viewport. This causes the web page to be smaller than the viewport. You can see in the video that the actual page does not resize with the viewport, unlike the other window where the content fits into the viewport (and is responsive).

In my particular case, the tests are failing because one of the alerts is "hidden" outside of the viewport (because the content does not get fitted in the viewport).

I'd love to get some help with this.

Thank you!

https://github.com/rubycdp/cuprite/assets/1334409/f7088a85-9740-437c-b323-23cf48f985d0

route commented 3 months ago

I think that's Chrome bug, what version are you using now? What version you used previously and when was the last update?

adrianthedev commented 3 months ago

It's Chrome Version 126.0.6478.127 (Official Build) (arm64) And cuprite (0.15.1)

How can I update it?

adrianthedev commented 3 months ago

Not sure what I had before. I switched from selenium

Nakilon commented 3 months ago

Does the issue disappear if you remove this line? https://github.com/rubycdp/ferrum/blob/99cfa84c56e55bb373da48935d08d5a13df1ad27/lib/ferrum/page.rb#L169

adrianthedev commented 3 months ago

Yes. The issue is fixed by removing that line. The page starts working properly now when resizing the browser.

Thanks!

Nakilon commented 3 months ago

I thought it was fixed: https://github.com/rubycdp/ferrum/issues/203