- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当 capybara 选择器格式错误或找不到时,我收到此错误(详情如下)。
自从我们最近升级到最新的驱动程序以来,我认为这是新的。
触发此命令的命令:find('.panel.#synopsis .btn', text: /new email/i)
之前出现这样的错误sudo lsof -i :9518
返回 6 个项目,之后似乎有数百个。
错误:
Failure/Error: TCPSocket.open(conn_addr, conn_port, @local_host, @local_port)
Errno::EMFILE:
Failed to open TCP connection to 127.0.0.1:9518 (Too many open files - socket(2) for "127.0.0.1" port 9518)
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/2.7.0/net/http.rb:960:in `initialize'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/2.7.0/net/http.rb:960:in `open'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/2.7.0/net/http.rb:960:in `block in connect'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/2.7.0/timeout.rb:78:in `timeout'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/2.7.0/net/http.rb:958:in `connect'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/2.7.0/net/http.rb:943:in `do_start'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/webmock-3.7.6/lib/webmock/http_lib_adapters/net_http.rb:136:in `start_with_connect_without_finish'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/webmock-3.7.6/lib/webmock/http_lib_adapters/net_http.rb:104:in `request'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/http/default.rb:129:in `response_for'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/http/default.rb:82:in `request'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/http/common.rb:64:in `call'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/bridge.rb:167:in `execute'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/w3c/bridge.rb:567:in `execute'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/w3c/bridge.rb:173:in `window_handles'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/common/driver.rb:187:in `window_handles'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/capybara-3.30.0/lib/capybara/selenium/driver.rb:208:in `window_handles'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/capybara-3.30.0/lib/capybara/selenium/driver_specializations/chrome_driver.rb:43:in `reset!'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/capybara-3.30.0/lib/capybara/session.rb:130:in `reset!'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/capybara-3.30.0/lib/capybara.rb:322:in `block in reset_sessions!'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/capybara-3.30.0/lib/capybara.rb:322:in `reverse_each'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/capybara-3.30.0/lib/capybara.rb:322:in `reset_sessions!'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/capybara-3.30.0/lib/capybara/rspec.rb:18:in `block (2 levels) in <top (required)>'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:450:in `instance_exec'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:450:in `instance_exec'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:363:in `run'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:515:in `block in run_owned_hooks_for'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:514:in `each'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:514:in `run_owned_hooks_for'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:601:in `block in run_example_hooks_for'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:600:in `each'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:600:in `run_example_hooks_for'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:471:in `run'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:510:in `run_after_example'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:276:in `block in run'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:503:in `block in with_around_and_singleton_context_hooks'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:460:in `block in with_around_example_hooks'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:472:in `block in run'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:612:in `block in run_around_example_hooks_for'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:345:in `call'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-rails-3.9.0/lib/rspec/rails/adapters.rb:127:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:450:in `instance_exec'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:450:in `instance_exec'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:381:in `execute_with'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:614:in `block (2 levels) in run_around_example_hooks_for'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:345:in `call'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:615:in `run_around_example_hooks_for'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/hooks.rb:472:in `run'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:460:in `with_around_example_hooks'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:503:in `with_around_and_singleton_context_hooks'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example.rb:254:in `run'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:633:in `block in run_examples'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:629:in `map'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:629:in `run_examples'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:595:in `run'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:596:in `block in run'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:596:in `map'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:596:in `run'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:596:in `block in run'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:596:in `map'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/example_group.rb:596:in `run'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/runner.rb:121:in `block (3 levels) in run_specs'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/runner.rb:121:in `map'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/runner.rb:121:in `block (2 levels) in run_specs'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/configuration.rb:2031:in `with_suite_hooks'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/runner.rb:116:in `block in run_specs'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/reporter.rb:74:in `report'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/runner.rb:115:in `run_specs'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/runner.rb:89:in `run'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/runner.rb:71:in `run'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/lib/rspec/core/runner.rb:45:in `invoke'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rspec-core-3.9.1/exe/rspec:4:in `<top (required)>'
# /Users/myuser/.rbenv/versions/2.7.0/bin/rspec:23:in `load'
# /Users/myuser/.rbenv/versions/2.7.0/bin/rspec:23:in `<top (required)>'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in `load'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/cli/exec.rb:63:in `kernel_load'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/cli/exec.rb:28:in `run'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/cli.rb:476:in `exec'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/cli.rb:30:in `dispatch'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/cli.rb:24:in `start'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bundler-2.1.2/libexec/bundle:46:in `block in <top (required)>'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/2.7.0/bundler/friendly_errors.rb:123:in `with_friendly_errors'
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bundler-2.1.2/libexec/bundle:34:in `<top (required)>'
# /Users/myuser/.rbenv/versions/2.7.0/bin/bundle:23:in `load'
# /Users/myuser/.rbenv/versions/2.7.0/bin/bundle:23:in `<main>'
#
# Showing full backtrace because every line was filtered out.
# See docs for RSpec::Configuration#backtrace_exclusion_patterns and
# RSpec::Configuration#backtrace_inclusion_patterns for more information.
# ------------------
# --- Caused by: ---
# Errno::EMFILE:
# Too many open files - socket(2) for "127.0.0.1" port 9518
# /Users/myuser/.rbenv/versions/2.7.0/lib/ruby/2.7.0/net/http.rb:960:in `initialize'
最佳答案
自从升级到 ruby 2.7
以来,我一直收到与 Capybara 功能规范相同的错误消息,它本身与打开的文件无关。当 Capybara 错过了一个选择器(在你的情况下,可能是 find('.panel.#synopsis .btn', text: /new email/i)
),它会抛出一个 socket(2)
太多文件错误。
关于selenium-chromedriver - Chromedriver/Capybara 打开的文件太多 - 用于 "127.0.0.1"端口 9518 的套接字(2),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59632283/
昨天我更新了我的旧 chromedriver(v2.0.204324.dyu) 并在 https://code.google.com/p/chromedriver/downloads/list 上传了
我在使用 Selenium WebDriver.chromedriver 获取 json 结果数据时遇到问题,服务器将响应 http 状态代码 429 太多请求。 但是当我直接使用 chrome 获取
所以我在 stack here 上看到了一个类似的问题,但它没有被接受的答案,也没有为我提供我需要的信息。 我正在尝试使用“chromedriver”,因为“selenium-webdriver”需要
嗨,在 headless centos 7 中,我正在尝试进行 headless selenium 测试。为此,我安装了 google-chrome、chromedriver 和 selenium p
已关闭。这个问题是 not reproducible or was caused by typos 。目前不接受答案。 这个问题是由拼写错误或无法再重现的问题引起的。虽然类似的问题可能是 on-top
已关闭。这个问题是 not reproducible or was caused by typos 。目前不接受答案。 这个问题是由拼写错误或无法再重现的问题引起的。虽然类似的问题可能是 on-top
我的问题与这篇文章有关:session not created: This version of ChromeDriver only supports Chrome version 74 error
我们试图在 Jenkins 上添加一些 selenium 脚本,但每当我们发出命令时,我都会收到错误消息“Chromedriver.exe 已停止工作”。 我将 chromedriver 移动到另一个
我使用的是 Macbook Pro,并且使用 Selenium 2.46.0 for Java 和 Chromedriver。我只有一个main方法,如下: public static void ma
我正在尝试在 heroku 上设置 selenium。我一直在看Running ChromeDriver with Python selenium on Heroku寻求帮助。基于此,我安装了列出的
当我设置初始设置 Nightwatchjs(使用初学者教程)时,出现如下错误: 尝试启动 ChromeDriver 时出错:无法解析路径:“/node_modules/.bin/chromedrive
我在 Windows 7 上使用 Selenium Chromedriver 时遇到问题。为了显示该问题,我将其简化为一个简单的脚本来简单地启动《纽约时报》网站: from selenium impo
问题 我一直在使用 Selenium 编写 Python 脚本,它在本地运行良好(因为我已将 ChromeDriver 安装在正确的目录中,即 assets/chromedriver),但它无法在赫罗
WebDriver driver = new ChromeDriver(options); 显示构造函数 ChromeDriver(ChromeOptions) 未定义,为什么? 最佳答案 导入以下语
我安装了 nuget 包 - Selenium.WebDriver.ChromeDriver 2.46.0.. 当我发布(通过 dotnet publish .Net CLI 命令).csprojec
我想用 chromedriver 从 fanfiction.net 上抓取一些故事。 我尝试以下方法: from selenium import webdriver import time path
当我尝试运行 npm install chromedriver 我得到... ChromeDriver installation failed Error extracting archive: Er
只是一个简单的 Python 代码: from selenium import webdriver chrome_options = webdriver.ChromeOptions() chrome_
使用 C# 在 selenium 中哪里可以找到 chromedriver.log。在哪里可以看到chromedriver的日志文件? ChromeOptions optn= new ChromeOp
我在 Linux 上使用 Node 5.10.0。运行脚本时出现一些问题,如下所示 [davea@mydevbox mydir]$ node SkyNet.js Validation Complete
我是一名优秀的程序员,十分优秀!