-
Notifications
You must be signed in to change notification settings - Fork 163
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
Changing screen resolution on Sauce Labs #237
Comments
Not sure if it matters, but you're using 2 different quoting symbols in your example:
I guess Yaml parser might get confused and not passing screen resolution at all. |
I fixed the quotes, but it still didn't work on Sauce Labs. I don't have MS Word, but I did grab that code from a web page. |
What I can suggest is compare the WebDriver logs on Sauce Labs website, when:
|
I did a diff -y on the selenium-server.log files for my behat session and my manual session. Here are the results up through the screen resolution steps: diff -y behat-selenium-server.log manual-selenium-server.log
[0.597][INFO]: COMMAND InitSession { | [0.567][INFO]: COMMAND InitSession {
"desiredCapabilities": { "desiredCapabilities": {
> "_cyborg_id": "9453e875f6884461abe5f03f79cdb92b",
"browserName": "chrome", "browserName": "chrome",
"chromeOptions": { "chromeOptions": {
"args": [ "start-maximized", "disable-webgl", "black "args": [ "start-maximized", "disable-webgl", "black
"binary": "D:\\Program Files\\Chrome 45\\45.0.2454.9 "binary": "D:\\Program Files\\Chrome 45\\45.0.2454.9
}, },
"debuggerAddress": "127.0.0.1:9222", "debuggerAddress": "127.0.0.1:9222",
"ignoreZoomSetting": false, <
"webdriver.remote.quietExceptions": true "webdriver.remote.quietExceptions": true
} }
} }
[0.598][INFO]: Populating Preferences file: { | [0.568][INFO]: Populating Preferences file: {
"alternate_error_pages": { "alternate_error_pages": {
"enabled": false "enabled": false
}, },
"autofill": { "autofill": {
"enabled": false "enabled": false
}, },
"browser": { "browser": {
"check_default_browser": false "check_default_browser": false
}, },
"distribution": { "distribution": {
"import_bookmarks": false, "import_bookmarks": false,
"import_history": false, "import_history": false,
"import_search_engine": false, "import_search_engine": false,
"make_chrome_default_for_user": false, "make_chrome_default_for_user": false,
"show_welcome_page": false, "show_welcome_page": false,
"skip_first_run_ui": true "skip_first_run_ui": true
}, },
"dns_prefetching": { "dns_prefetching": {
"enabled": false "enabled": false
}, },
"profile": { "profile": {
"content_settings": { "content_settings": {
"pattern_pairs": { "pattern_pairs": {
"https://*,*": { "https://*,*": {
"media-stream": { "media-stream": {
"audio": "Default", "audio": "Default",
"video": "Default" "video": "Default"
} }
} }
} }
}, },
"default_content_settings": { "default_content_settings": {
"geolocation": 1, "geolocation": 1,
"mouselock": 1, "mouselock": 1,
"notifications": 1, "notifications": 1,
"popups": 1, "popups": 1,
"ppapi-broker": 1 "ppapi-broker": 1
}, },
"password_manager_enabled": false "password_manager_enabled": false
}, },
"safebrowsing": { "safebrowsing": {
"enabled": false "enabled": false
}, },
"search": { "search": {
"suggest_enabled": false "suggest_enabled": false
}, },
"translate": { "translate": {
"enabled": false "enabled": false
} }
} }
[0.598][INFO]: Populating Local State file: { | [0.568][INFO]: Populating Local State file: {
"background_mode": { "background_mode": {
"enabled": false "enabled": false
}, },
"ssl": { "ssl": {
"rev_checking": { "rev_checking": {
"enabled": false "enabled": false
} }
} }
} }
[0.600][INFO]: Launching chrome: "D:\Program Files\Chrom | [0.571][INFO]: Launching chrome: "D:\Program Files\Chrome 45\
[1.563][INFO]: RESPONSE InitSession { | [1.660][INFO]: RESPONSE InitSession {
"acceptSslCerts": true, "acceptSslCerts": true,
"applicationCacheEnabled": false, "applicationCacheEnabled": false,
"browserConnectionEnabled": false, "browserConnectionEnabled": false,
"browserName": "chrome", "browserName": "chrome",
"chrome": { "chrome": {
"userDataDir": "C:\\Users\\ADMINI~1\\AppData\\Loca | "userDataDir": "C:\\Users\\ADMINI~1\\AppData\\Local\\Te
}, },
"cssSelectorsEnabled": true, "cssSelectorsEnabled": true,
"databaseEnabled": false, "databaseEnabled": false,
"handlesAlerts": true, "handlesAlerts": true,
"javascriptEnabled": true, "javascriptEnabled": true,
"locationContextEnabled": true, "locationContextEnabled": true,
"mobileEmulationEnabled": false, "mobileEmulationEnabled": false,
"nativeEvents": true, "nativeEvents": true,
"platform": "Windows NT", "platform": "Windows NT",
"rotatable": false, "rotatable": false,
"takesHeapSnapshot": true, "takesHeapSnapshot": true,
"takesScreenshot": true, "takesScreenshot": true,
"version": "45.0.2454.93", "version": "45.0.2454.93",
"webStorageEnabled": true "webStorageEnabled": true
} }
[1.700][INFO]: COMMAND ExecuteScript { | [1.786][INFO]: COMMAND ExecuteScript {
"args": [ ], "args": [ ],
"script": "return screen.width" "script": "return screen.width"
} }
[1.700][INFO]: Waiting for pending navigations... | [1.786][INFO]: Waiting for pending navigations...
[1.700][INFO]: Done waiting for pending navigations | [1.786][INFO]: Done waiting for pending navigations
[1.703][INFO]: Waiting for pending navigations... | [1.790][INFO]: Waiting for pending navigations...
[1.703][INFO]: Done waiting for pending navigations | [1.790][INFO]: Done waiting for pending navigations
[1.703][INFO]: RESPONSE ExecuteScript 1024 | [1.790][INFO]: RESPONSE ExecuteScript 1920
[1.705][INFO]: COMMAND ExecuteScript { | [1.792][INFO]: COMMAND ExecuteScript {
"args": [ ], "args": [ ],
"script": "return screen.height" "script": "return screen.height"
} }
[1.705][INFO]: Waiting for pending navigations... | [1.792][INFO]: Waiting for pending navigations...
[1.705][INFO]: Done waiting for pending navigations | [1.792][INFO]: Done waiting for pending navigations
[1.707][INFO]: Waiting for pending navigations... | [1.794][INFO]: Waiting for pending navigations...
[1.707][INFO]: Done waiting for pending navigations | [1.794][INFO]: Done waiting for pending navigations
[1.707][INFO]: RESPONSE ExecuteScript 768 | [1.794][INFO]: RESPONSE ExecuteScript 1200
[1.709][INFO]: COMMAND SetWindowPosition { | [1.796][INFO]: COMMAND SetWindowPosition {
"windowHandle": "current", "windowHandle": "current",
"x": 0, "x": 0,
"y": 0 "y": 0
} }
[1.712][INFO]: Waiting for pending navigations... | [1.800][INFO]: Waiting for pending navigations...
[1.727][INFO]: Done waiting for pending navigations | [1.816][INFO]: Done waiting for pending navigations
[1.918][INFO]: RESPONSE SetWindowPosition | [1.969][INFO]: RESPONSE SetWindowPosition
[1.921][INFO]: COMMAND SetWindowSize { | [1.972][INFO]: COMMAND SetWindowSize {
"height": 768, | "height": 1200,
"width": 1024, | "width": 1920,
"windowHandle": "current" "windowHandle": "current"
} }
[2.038][INFO]: RESPONSE SetWindowSize | [2.089][INFO]: RESPONSE SetWindowSize
[2.041][INFO]: COMMAND MaximizeWindow { | [2.092][INFO]: COMMAND MaximizeWindow {
"windowHandle": "current" "windowHandle": "current"
} }
[2.060][INFO]: RESPONSE MaximizeWindow | [2.207][INFO]: RESPONSE MaximizeWindow
[2.068][INFO]: COMMAND GetWindows { | [2.212][INFO]: COMMAND GetWindows {
} }
[2.069][INFO]: RESPONSE GetWindows [ "CDwindow-2FF9F7B9- | [2.213][INFO]: RESPONSE GetWindows [ "CDwindow-00FB9D8B-5160-
[2.130][INFO]: COMMAND SetWindowSize { | [2.272][INFO]: COMMAND Navigate {
"height": 900, <
"width": 1440, <
"windowHandle": "current" <
} <
[2.244][INFO]: RESPONSE SetWindowSize <
[2.333][INFO]: COMMAND Navigate { <
"url": "http://test-site.gotpantheon.com/" < |
I can't read this. Maybe instead you can create gist with contents of both logs and I do a compare in my favorite app. |
Derp. My apologies. Thanks for your patience. Here are the gists. I truncated the behat log at navigation. If you need more than that let me know. What is your favorite diff app, btw? https://gist.github.com/taraneier/3418a72249ceb35a7a995f1b4b7ce041 |
Here are importants parts from above logs. When Behat does that:
When user is doing that:
Interesting is that according to Still have no idea why this is happening like that. |
I have updated the behat-selenium-server.log. The 1440x900 came from an attempt I made with changing the screen resolution with FeatureContext.php as shown below. I have removed that part of the FeatureContext.php and re-ran the tests and updated the log. FeatureContext.php - before removing @BeforeScenario section |
Is there a solution for this? I'm trying to accomplish something similar... |
I have no idea. Maybe Sauce Labs support needs to be contacted for any solution that we later can implement in the driver. |
It looks like SauceLabs renamed many of the capabilities for consistency. A couple were camelCase (e.g., In this case, You'll want to open an issue/PR against |
Greetings,
I am using the following .yml file to run my tests against Sauce Labs. Most of my tests break due to responsive design and the default resolution. I need to start up the VM with screen resolution of 1920x1200, otherwise it's getting the default value 1024x768. Unfortunately the yml isn't working and Sauce Labs is saying the problem is with the Mink Driver. Apologies if this is posted in the wrong spot.
Best regards,
Tara
sauce.yml
The text was updated successfully, but these errors were encountered: