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

Setting a web driver capability to a map using the serenity.driver.capabilities system property #527

Closed
regwhitton opened this issue Sep 13, 2016 · 3 comments

Comments

@regwhitton
Copy link

Hello.

I am currently trying to use Chrome's mobile emulation to test a mobile site. This is supported by ChromeDriver as documented here: Mobile Emulation. This shows setting the chromeOptions capability to a map of values.

Currently Serenity's serenity.driver.capabilities allows us to pass driver capabilites which are of type String, Integer, Boolean and java.util.List. This is done within CapabilitySet.asObject().

Could CapabilitySet be extended to also allow a java.util.Map to also be passed, so that mobile emulation could be enabled by setting the serenity.driver.capabilities property to something like:

serenity.driver.capabilities=chromeOptions:{mobileEmulation:{deviceName:'Google Nexus 5',userAgent:'Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19'}}

@wakaleo
Copy link
Member

wakaleo commented Nov 8, 2017

This would be a good candidate for a PR.

@anujtiwari24
Copy link

Is there any update on this issue? How to do this??

@wakaleo
Copy link
Member

wakaleo commented Mar 3, 2020

I believe this has been possible for quite a while.

@wakaleo wakaleo closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants