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] RemoteDriverProtocol does not set user agent correctly #735

Closed
GerbenKD opened this issue Jun 26, 2019 · 1 comment
Closed

[Bug] RemoteDriverProtocol does not set user agent correctly #735

GerbenKD opened this issue Jun 26, 2019 · 1 comment
Labels
Milestone

Comments

@GerbenKD
Copy link

The RemoteDriverProtocol class scans for the $useragent String here (in RemoteDriverProtocol):

            Entry<String, Object> entry = iter.next();
            Object val = entry.getValue();
            // substitute variable $useragent for the real value
            if (val instanceof String
                    && "$useragent".equalsIgnoreCase(val.toString())) {
                val = userAgentString;
            }
            capabilities.setCapability(entry.getKey(), entry.getValue());

However, the changed value is never actually used, instead the orginal value in the entry is used.
Related, I'm not sure this is the right way to set the user-agent for Chrome.

cheers and thanks,

Gerben

@GerbenKD GerbenKD changed the title RemoteDriverProtocol does not set user agent correctly RemoteDriverProtocol does not set user agent correctly [Bug] Jun 26, 2019
@GerbenKD GerbenKD changed the title RemoteDriverProtocol does not set user agent correctly [Bug] RemoteDriverProtocol does not set user agent correctly Jun 26, 2019
@GerbenKD GerbenKD changed the title RemoteDriverProtocol does not set user agent correctly [Bug] RemoteDriverProtocol does not set user agent correctly Jun 26, 2019
@jnioche jnioche added this to the 1.15 milestone Jun 26, 2019
@jnioche jnioche added the bug label Jun 26, 2019
@jnioche
Copy link
Contributor

jnioche commented Jun 26, 2019

thanks @GerbenKD, should now be fixed

feel free to open a PR if you find that Chrome requires a different mechanism

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants