#capybara #apparition
Вопрос:
я впервые пробую веб-драйвер, отличный от selenium, с капибарой.
Я сделал этот очень маленький скрипт ниже, просто чтобы увидеть, как он работает, но возникает недопустимая ошибка uri.
require 'capybara'
require 'capybara/DSL'
require 'capybara/apparition'
include Capybara::DSL
Capybara.javascript_driver = :apparition
Capybara.default_driver = :apparition
visit('https://github.com/twalpole/apparition')
Ошибка, вызванная:
> ruby test.rb
Traceback (most recent call last):
15: from test.rb:9:in `<main>'
14: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/capybara-3.34.0/lib/capybara/DSL.rb:58:in `block (2 levels) in <module:DSL>'
13: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/capybara-3.34.0/lib/capybara/session.rb:278:in `visit'
11: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/apparition-0.6.0/lib/capybara/apparition/driver.rb:50:in `browser'
10: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/apparition-0.6.0/lib/capybara/apparition/driver.rb:69:in `client'
9: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/apparition-0.6.0/lib/capybara/apparition/driver/chrome_client.rb:16:in `client'
8: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/apparition-0.6.0/lib/capybara/apparition/driver/chrome_client.rb:16:in `new'
7: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/apparition-0.6.0/lib/capybara/apparition/driver/chrome_client.rb:33:in `initialize'
6: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/apparition-0.6.0/lib/capybara/apparition/driver/chrome_client.rb:33:in `new'
5: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/apparition-0.6.0/lib/capybara/apparition/driver/web_socket_client.rb:10:in `initialize'
4: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/apparition-0.6.0/lib/capybara/apparition/driver/web_socket_client.rb:10:in `new'
3: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/apparition-0.6.0/lib/capybara/apparition/driver/web_socket_client.rb:69:in `initialize'
2: from C:/Ruby26-x64/lib/ruby/2.6.0/uri/common.rb:234:in `parse'
1: from C:/Ruby26-x64/lib/ruby/2.6.0/uri/rfc3986_parser.rb:73:in `parse'
C:/Ruby26-x64/lib/ruby/2.6.0/uri/rfc3986_parser.rb:67:in `split': bad URI(is not URI?): "ws://127.0.0.1:65515/devtools/browser/1c053b9f-60e6-4cef-822f-4d336aac7fadr" (URI::InvalidURIError)
Я что-то упускаю?
У меня установлены следующие версии: capybara (3.34.0), apparition (0.6.0) и chrome (91.0.4472.77) в Windows 10 pro 20H2.