-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Protractor ChromeDriver configuration for mobile emulation #728
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
Comments
up, this question is also important for me |
try: capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': ['show-fps-counter=true'],
'mobileEmulation' : {
'deviceName': 'Apple iPhone 6'
}
}
} |
@daniel-rabe @michaelerobertsjr Nice I'm also interested in this kind of solution. Is there also a way to name the xml output files different by deviceName? |
@daniel-rabe @michaelerobertsjr Hi! thanks to your solution now I am able to run my tests of a Web with Chromedriver mobile emulation. This is my config:
Is there a way to have an "array" of devices to run the tests on? What I really would like is to be able to run the same tests over a list of device |
Thanks @LaiaPR your solution works pretty well. I have a solution to add a list of devices. It is working for me but I think that maybe there is a clean solution. Remove
Testing on desktop (firefox, chrome) |
@aluzardo Hi!! Thanks for sharing your solution! I found the same solution as you (multicapabilities) and forgot to post it >_< Yes, it's the right one! |
I implemented this now non of my swiping gestures work |
@daniel-rabe Thanks for sharing your solution! |
Hi all, I am struggling to run the protractor emulating the mobile. my conf file is as you suggested: // Capabilities to be passed to the webdriver instance. Am I missing something? Is there another place where I have to declare the device? Are you also using Appium? |
@ingriddbritok3 I have tried 'Nexus 5' instead of 'Google Nexus 5' and it worked. |
Yes it worked with only giving 'Nexus 5' I want to run single scenario on mobile emulation. How can I achieve that? Can it be possible using cucumber tagged hook? If yes then how? I am using protractor-cucumber-framework. |
@nishudixit 'Nexus 5` is very old device, I added a custom device such as iPhone 12 but it doesn't work, any idea why it supports only these super old devices? |
How to set the orientation to landscape?? |
We're working on end to end testing with protractor. We need to test our website on a variety of mobile devices so we would like to use ChromeDriver Emulation
The docs on the site are really thin, can anyone point me in the correct direction to get the setup complete? Here is what I have so far:
Updated chromedriver to 2.9.248307 (chromedriver 2.11 appears to be the first version with mobile emulation but 2.10 was the default in the generator.
In protractor.conf.js have set chromeOnly: true
Device capabilities are shown below. It doesn't seem to matter what I provide, it runs chromedriver but it appears to ignore the capabilities set in protractor.conf.js:
What else needs to be configured/provided?
The text was updated successfully, but these errors were encountered: