cuprite icon indicating copy to clipboard operation
cuprite copied to clipboard

Improve documentation on user agent strings

Open edwinv opened this issue 4 years ago • 1 comments

In our test suite, we also test with mobile user agents. We do this by creating several different drivers with different user agents. Coming from Selenium, I was used to set the user agent in the browser options. With no mention of the user-agent option in the Ferrum or Cuprite documentation, I assumed we needed to use headers:

driver = Capybara::Cuprite::Driver.new(app)
driver.add_header("User-Agent", "...")

This works fine for the first request in the driver, but subsequent requests fail due to the reset of the headers. I found out the user-agent browser option still works fine. I think it is worth a mention in the README so other developers also know how to set the right user-agent string for their drivers.

edwinv avatar Jul 27 '21 07:07 edwinv

This sounds like a bug, it shouldn't be like that

route avatar Sep 27 '21 08:09 route