Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: undefined method `manage' for an instance of WebDriverScriptAdapter::QuerySelectorAdapter #418

Open
amkisko opened this issue Oct 22, 2024 · 0 comments

Comments

@amkisko
Copy link

amkisko commented Oct 22, 2024

Describe the bug

I tried to use axe-core-rspec in pair with capybara-playwright-driver.

After reading the code, I could not figure out from which part method manage should come and there are no visible traces if it ever was in WebDriverScriptAdapter::QuerySelectorAdapter.

Any suggestions on how to fix this error?

To Reproduce

Gemfile

gem "axe-core-rspec"
gem "capybara", require: false
gem "capybara-playwright-driver", require: false

rspec test case

require "capybara"
require "capybara-playwright-driver"
require "playwright"

Capybara.register_driver(:playwright) do |app|
  Capybara::Playwright::Driver.new(
    app,
    timeout: Capybara.default_max_wait_time,
    browser_type: ENV.fetch("BROWSER", "chromium").to_sym, # :chromium (default) or :firefox, :webkit
    headless: ENV["HEADFUL"].nil? || !ENV["CI"].nil?, # true for headless mode (default), false for headful mode.
    playwright_cli_executable_path: "npx playwright"
  )
end
Capybara.default_driver = Capybara.javascript_driver = :playwright

it "has no accessibility errors" do
  expect(page).to be_axe_clean
end

Expected behavior
It runs the validations.

Actual behavior
Returns

NoMethodError:
        undefined method `manage' for an instance of WebDriverScriptAdapter::QuerySelectorAdapter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant