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

Support w3c for latest chrome / chromedriver releases #244

Open
maryolivier opened this issue Aug 7, 2019 · 2 comments
Open

Support w3c for latest chrome / chromedriver releases #244

maryolivier opened this issue Aug 7, 2019 · 2 comments

Comments

@maryolivier
Copy link

maryolivier commented Aug 7, 2019

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
          }
        }
      )
@maryolivier
Copy link
Author

My thought is to make a new method called send_keys_to_element and leave the old method available until it's no longer needed at all.

@michallepicki
Copy link

Last year I was working on adding W3C WebDriver support to Wallaby, and while the work is not merged upstream yet (and I don't work with Wallaby much anymore so it's more likely to be implemented by someone else), I think it could be useful to anyone working on this.

Additionally, I know @aaronrenner is working on web_driver_client which aims to provide clients for all "WebDriver" protocols as well as a common interface to them - this also could be useful.

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

2 participants