Reputation: 2580
I managed to set up a Node + Hub on my own pc.
I have a file called run_parallel_test.py
that simply just creates a process to execute test scripts based on sys args, which are just browser configs with capabilities.
The command would be as follows:
python run_parallel_tests.py testrunner.py browsers.json
testrunner.py
is basically Python's unittest framework executing test suites.
The issue I am having is before, I was hooked with browser stack and not selenium grid, I was able to pass browser capabilities such as this:
[
{
"browser": "Chrome",
"browser_version": "71.0 beta",
"os": "Windows",
"os_version": "10",
"resolution": "1920x1080"
},
{
"browser": "Firefox",
"browser_version": "blah blah",
"os": "Windows",
"os_version": "10",
"resolution": "1920x1080"
}
]
Now with a grid, those capabilities no longer work, and I have created barebone capabilities to simply run my tests such as:
[
{
"browserName": "chrome",
"browser_version": "71.0 beta",
"platform": "WINDOWS"
},
{
"browserName": "firefox",
"browser_version": "64.0 beta",
"platform": "WINDOWS"
},
{
"browserName": "chrome",
"platform": "WINDOWS"
},
{
"browserName": "internet explorer",
"platform": "WINDOWS"
}
]
The issue is, I no longer can set the resolution etc via my JSON file config as I was before when using browser stack. Is there a way to set up the resolution?
I have checked: https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities I could not find the documentation for it. Maybe I am looking at the wrong place.
Upvotes: 0
Views: 1657
Reputation: 2573
You can't set that via the server/grid because they don't setup a container for your browser to run in like browser stack. You will need to set the browser size in your python code via the set_window_size command
Upvotes: 1