提问人:dibusure 提问时间:8/22/2023 最后编辑:engineersmnkydibusure 更新时间:8/22/2023 访问量:42
任何带有 Selenium 的程序都会抛出错误
Any program with Selenium throws an error
问:
任何带有 Selenium 的程序都会抛出如下错误:
/home/dibusure/.local/share/gem/ruby/3.1.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/remote/http/default.rb:108:in `new_request_for': uninitialized constant Selenium::WebDriver::Remote::Http::Default::Net (NameError)
req = Net::HTTP.const_get(verb.to_s.capitalize).new(url.path, headers)
^^^
Did you mean? Set
from /home/dibusure/.local/share/gem/ruby/3.1.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/remote/http/default.rb:74:in `request'
from /home/dibusure/.local/share/gem/ruby/3.1.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/remote/http/common.rb:59:in `call'
from /home/dibusure/.local/share/gem/ruby/3.1.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/remote/bridge.rb:620:in `execute'
from /home/dibusure/.local/share/gem/ruby/3.1.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/remote/bridge.rb:53:in `create_session'
from /home/dibusure/.local/share/gem/ruby/3.1.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/common/driver.rb:317:in `block in create_bridge'
from <internal:kernel>:90:in `tap'
from /home/dibusure/.local/share/gem/ruby/3.1.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/common/driver.rb:316:in `create_bridge'
from /home/dibusure/.local/share/gem/ruby/3.1.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/common/driver.rb:74:in `initialize'
from /home/dibusure/.local/share/gem/ruby/3.1.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/firefox/driver.rb:43:in `initialize'
from /home/dibusure/.local/share/gem/ruby/3.1.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/common/driver.rb:53:in `new'
from /home/dibusure/.local/share/gem/ruby/3.1.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver/common/driver.rb:53:in `for'
from /home/dibusure/.local/share/gem/ruby/3.1.0/gems/selenium-webdriver-4.11.0/lib/selenium/webdriver.rb:88:in `for'
from main.rb:13:in `initialize_driver'
from main.rb:6:in `initialize'
from main.rb:54:in `new'
from main.rb:54:in `<main>'
通过捆绑安装的 Gecko 和 selenium,我的系统是 nixos
尝试过 Kubuntu 和 Nixos,尝试过 Chromedriver 预计硒上市
答: 暂无答案
评论