Skip to content

Support w3c for latest chrome / chromedriver releases #244

Description

@maryolivier

Background

As of now, I need to disable w3c mode within my passed in chromeOptions in order to avoid errors that occur when I use .send_keys(). It seems that the latest versions of chrome/chromedriver do not support command sendKeysToActiveElement. I'm going to start here: https://chromium.googlesource.com/chromium/src/+/master/docs/chromedriver_status and see if i can submit a PR for this.

Workaround

(not sure how long this will last so I'd like to fix as soon as possible)

  • When starting hound session, include "w3c" => false option within chromeOptions map.
      Hound.start_session(
        metadata: metadata,
        additional_capabilities: %{
          javascriptEnabled: true,
          chromeOptions: %{
            "args" => [
              "--user-agent=#{
                Hound.Browser.user_agent(:chrome) |> Hound.Metadata.append(metadata)
              }",
              "--headless",
              "--disable-gpu"
            ],
            "w3c" => false
          }
        }
      )

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