Articles
Help Articles
Passing multiple browsers capabilities in a single job
Capabilities, jobs, Chrome/Firefox/Safari/Edge/IE, multiple desired capabilities
To learn more on desired capabilities please visit previous articles here.
To pass multiple capabilities in a single job we need to use a custom structure.
That structure has to be a valid JSON object without duplicate keys.
For example here is a structure for capabilities for Chrome in a job:
1
{
2
"browserName": "chrome",
3
"goog:chromeOptions": {
4
"args": [
5
"--window-size=1080,1080"
6
]
7
}
8
}
Copied!
In order to achieve capabilities for multiple browsers we need to omit the "browserName", we can then use the following structure:
1
{
2
"ms:edgeOptions": {
3
"args": [
4
"--inprivate"
5
]
6
},
7
"goog:chromeOptions": {
8
"args": [
9
"--incognito"
10
]
11
},
12
"moz:firefoxOptions": {
13
"args": [
14
"-private"
15
]
16
},
17
"se:ieOptions": {
18
"args": []
19
},
20
"safari.options": {
21
"args": [
22
"--use-fake-ui-for-media-stream"
23
]
24
}
25
}
Copied!
Note:
1) Any browser you select in the job will be affected by the capabilities provided under the "options" key.
2) If you do not select all the browsers you provided capabilities for it should only affect the ones selected.
3) Under "args" array the same arguments can be set across browsers, however note that they may vary between browsers.
Copy link