水豚poltergeist - 覆盖用户代理 [英] capybara poltergeist - override user agent

查看:140
本文介绍了水豚poltergeist - 覆盖用户代理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我发现了一些关于配置selenium webdriver的信息:
http:// blog .pptaformatec.com.br / 2011/03 / configuration-user-agents-with-capybara-selenium-webdriver /

这在水豚中是如何实现的poltergeist?

解决方案

请参阅poltergeist github页面上的链接:
https://github.com/teampoltergeist/poltergeist#manipulating-request-headers


Does somebody know how I could override the user agent of capybara poltergeist to a mobile one for testing?

I found something about configuring that for the selenium webdriver: http://blog.plataformatec.com.br/2011/03/configuring-user-agents-with-capybara-selenium-webdriver/

How this is possible in capybara poltergeist?

解决方案

see that link on the poltergeist github page: https://github.com/teampoltergeist/poltergeist#manipulating-request-headers

这篇关于水豚poltergeist - 覆盖用户代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆