Skip to content

DOMException: Failed to execute 'querySelectorAll' on 'Element': The provided selector is empty. #83

Description

@rosenfeld

Hi, I've been using Poltergeist for a long time in a monitoring project and now I noticed it's time to upgrade it. I was trying apparition, but after installing Chrome and following the instructions, I tried to play with it and got this error:

# Gemfile
source "https://rubygems.org"
gem 'apparition', github: 'twalpole/apparition'
gem 'capybara'

# test.rb
require 'capybara/dsl'
require 'capybara/apparition'
Capybara.default_driver = :apparition

Capybara.register_driver :apparition do |app|
  Capybara::Apparition::Driver.new(app, browser_options:
    { 'no-sandbox' => nil, 'disable-web-security' => nil,
      'disable-features' => 'VizDisplayComposito' })
end

class Session
  include Capybara::DSL
end

session = Session.new
session.visit 'https://www.google.com'
session.page.find('body').first # calling first triggers the error

Am I doing something wrong?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions