日志中的selenium webdriver ruby??警告消息
发布时间:2020-12-17 02:07:13 所属栏目:百科 来源:网络整理
导读:我使用ide记录了一些测试,然后将它们导出到 ruby / rspec.当我运行它们时它们起作用,但是我收到很多警告.你能告诉我如何摆脱这个警告吗? net/http: warning: Content-Type did not set; using application/x-www-form-urlencoded 每当我尝试调用驱动程序查
我使用ide记录了一些测试,然后将它们导出到
ruby / rspec.当我运行它们时它们起作用,但是我收到很多警告.你能告诉我如何摆脱这个警告吗?
net/http: warning: Content-Type did not set; using application/x-www-form-urlencoded 每当我尝试调用驱动程序查找元素时,我都会得到这个. 解决方法
我在2018年仍然遇到一些Selenium命令.解决方法:
module Selenium module WebDriver module Remote module Http class Common ORIGINAL_DEFAULT_HEADERS = DEFAULT_HEADERS remove_const :DEFAULT_HEADERS DEFAULT_HEADERS = ORIGINAL_DEFAULT_HEADERS.merge( 'Content-Type' => 'application/x-www-form-urlencoded' ).freeze end end end end end (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |