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
This mainly for the ability that running the same code will get the same result, no matter where it is. It's very helpful to reproduce problems. And the device can be changed. It's just a hard-code device setting.
As @ysmood's answer in discord. We need to change user agent manually in windows(how to). The current user agent in windows is "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36".
Rod Version: v0.116.2
The defaultDevice of a
rod.Browser
isdevices.LaptopWithMDPIScreen.Landscape()
, which is a device whose UserAgent's platform is mac, even in windows.rod/browser.go
Lines 69 to 82 in 01a50b9
rod/lib/devices/list.go
Lines 615 to 632 in 01a50b9
So if a web site has some logic depend on
navigator.userAgent
, it will lead to an unexpected result in windows.The text was updated successfully, but these errors were encountered: