jjzjj

chrome-devtools-protocol

全部标签

ruby - 下载位置 Selenium-webdriver Cucumber Chrome

我将Cucumber与Ruby结合使用。通过Selenium-Webdriver在Chrome中运行测试时,我想将下载位置更改为测试文件夹而不是用户下载文件夹。我当前的chrome驱动程序是这样设置的:Capybara.default_driver=:seleniumCapybara.register_driver:seleniumdo|app|Capybara::Selenium::Driver.new(app,:browser=>:chrome,desired_capabilities:{'chromeOptions'=>{'args'=>%w{window-size=1920,1

ruby - HTTP POST 上的 SSL 错误(未知协议(protocol))

尝试通过SSL连接到ImgurAPI时出现错误。这是代码和错误:API_URI=URI.parse('https://api.imgur.com')API_PUBLIC_KEY='Client-ID--'ENDPOINTS={:image=>'/3/image',:gallery=>'/3/gallery'}#Public:Uploadanimage##args-Theimagepathfortheimagetoupload#defupload(image_path)http=Net::HTTP.new(API_URI.host)http.use_ssl=truehttp.verify

ruby - 是否有 chrome 开关来抑制 'external protocol request' ?

是否有chrome开关来抑制“外部协议(protocol)请求”?我正在使用selenium-ruby​​-watirwebdriver自动化应用程序。我在网上搜索了绕过此窗口和对话的解决方案:http://productforums.google.com/forum/#!topic/chrome/K22hXwRy6zQ概述了我们如何手动执行此操作。但是对于Selenium-Chrome-Ruby,我需要通过可能设置一个chrome开关(chorme开关列表:=http://src.chromium.org/svn/trunk/src/chrome/common/chrome_swit

ruby - 运行测试时静音 Chrome 驱动程序控制台输出

我使用的是最新版本的Chrome(32.0.1700.107)和Chrome驱动程序(V2.8)。但是当我在Ruby中使用以下代码运行示例测试时:require'selenium-webdriver'WAIT=Selenium::WebDriver::Wait.new(timeout:100)$driver=Selenium::WebDriver.for:chrome$driver.manage.window.maximize$driver.navigate.to'https://www.google.co.in'defapps_hoverele_hover=$driver.find_

ruby - session 未创建 : Chrome version must be between

当使用ruby​​selenium驱动程序驱动chrome时,我得到/home/travis/.rvm/gems/ruby-2.6.2/gems/selenium-webdriver-3.141.5926/lib/selenium/webdriver/remote/response.rb:72:in`assert_ok':sessionnot创建:Chrome版本必须在70和73之间(Selenium::WebDriver::Error::SessionNotCreatedError)如何解决这个问题?降级chrome不是我想做的事。 最佳答案

ruby - Watir 无法找到我在 Chrome 的 DOM 检查器中看到的元素

这是一个研究案例:......我正在尝试使用WatirRuby的API引用名为“bar”的嵌入元素。该元素由Chrome的DOM检查器显示,但我无法使用Watir的任何查找方法找到它:browser.embeds()#onlyisfoundbrowser.html.include?'bar'#=>false为什么会这样?为什么Watir不显示完整的HTML?如果我有不同框架中的元素或由Javascript初始化函数动态插入的元素,是否可以使用Watir访问它们?谢谢 最佳答案 如果元素在框架中,你必须使用这样的东西:browser.

ruby - Chromedriver Devtools 端口号错误

尝试使用capybara、selenium和chromedriver-helper运行测试时出现以下错误。使用相同版本的chromedriver,测试在mac上本地运行良好。我已经尝试在我的spec_helper中明确设置远程调试端口,但显然这被忽略了,因为chromedriver使用随机远程调试端口。Selenium::WebDriver::Error::UnknownError:unknownerror:Devtoolsportnumberfilecontentswereinanunexpectedformat(Driverinfo:chromedriver=2.40.565383

ruby - 如何在 headless Chrome 上使用 Selenium Webdriver?

我正在学习将Selenium用于基本操作,例如截屏、抓取和测试,并希望将其与headlessChrome一起使用,Chrome59现已稳定。我已经能够使用“selenium-webdriver”gem和chromedriver截取屏幕截图,但不是headless的。这是我正在运行的ruby​​脚本,它在开始初始化驱动程序后挂起require'rubygems'require'selenium-webdriver'Selenium::WebDriver.logger.level=:debugp'initializingdriver'driver=Selenium::WebDriver.f

nginx配置https后报错nginx: [emerg] https protocol requires SSL support in XXX.conf详细解决方法

一、前言最近,在测试环境的nginx里增加了一个https配置:location/api-meeting-qq/{proxy_passhttps://api.meeting.qq.com/;}然后,执行命令://这个是nginx启动文件的路径,根据实际情况自行更改sudo/home/useradmin/nginx/sbin/nginx-sreload结果,nginx就报错了:nginx:[emerg]httpsprotocolrequiresSSLsupportin/home/useradmin/nginx/conf.d/trainNginx.conf:9二、解决方法百度发现,是之前安装ngi

ruby - Chrome 的自定义配置文件

环境:MacOSX10.8.3、Ruby2.0.0p0、selenium-webdriver2.32.1、ChromeDriver26.0.1383.0。我想更改默认浏览器语言。我正在测试站点是否正确检测浏览器语言并以该语言显示页面。我能够将Firefox语言设置为德语:require"selenium-webdriver"profile=Selenium::WebDriver::Firefox::Profile.newprofile["intl.accept_languages"]="de"caps=Selenium::WebDriver::Remote::Capabilities.