cuprite
cuprite copied to clipboard
Add support for emulating devices for hover and pointer css media queries
The pointer, any-pointer, hover and any-hover media queries allow you to style a page based on the available input devices. Currently there is no way I can see to change how cuprite/ferrum responds to these queries.
E.g. I have a site where the navigation is different based on whether you have a mouse or not. Currently, only the touch version of the site can be tested because @media (any-hover: hover) will never work in a cuprite-driven browser.
If you can live with always having the same setting, you can set the browser option blink-settings for this.
For example:
Capybara::Cuprite::Driver.new(app, {
browser_options: {
'blink-settings': 'primaryPointerType=4'
}
})