Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Content Zone
locationtop
printablefalse
OptionDescriptionKeyValue TypeExample

Version (Browser)

If this capability is null, an empty string, or omitted altogether, the latest version of the browser will be used automatically.versionstring or integer"version": "35"

Pre-run Executables

You can provide a URL to an executable file, which will be downloaded and executed to configure the VM before the test starts. For faster performance, you may want to upload the executable to temporary Sauce storage. This capability takes a JSON object with four main keys. Check out the topics under Using Pre-Run Executables to Configure Browsers and Virtual Machines for more information.

Tip
titleRunning AutoIt Scripts

If you want to run an AutoIt script during your test, compile it as an exe, send it using this capability, and set  background  to  true  to allow AutoIt to continue running throughout the full duration of your test. 

Tip
titleUsing Multiple Pre-Run Executables

If you need to send multiple pre-run executables, the best way is to bundle them into a single executable file, such as a self-extracting zip file.

prerun

(primary key)

 

"prerun": { "executable": "http://url.to/your/executable.exe", "args": [ "--silent", "-a", "-q" ], "background": false, "timeout": 120 }

Tip
titleSending a Single String Instead of JSON

If a single string is sent as the    prerun    capability rather than a JSON object, this string is considered to be the URL to the executable, and the executable launches with background set to false .


 The URL to the executable you want to run before your browser session starts.

executable

(secondary key)

  
 

A list of the command line parameters that you want the executable to receive. Valid arguments are:

--silent or /SInstalls the script silently without raising any dialogs
-aAdd switches to the command line of the underlying setup.exe process
-q  Like --silent , installs the script without raising any dialogs 

args

(secondary key)

  
 A boolean that defines whether Sauce should wait for this executable to finish before your browser session starts. If background isn't set or is set to  false , Sauce will wait for up to 90 seconds for the executable to finish. At that point, the browser will start and your test will proceed.

background

(secondary key)

  
 The number of seconds Sauce will wait for your executable to finish before your browser session starts. If timeout isn't set, Sauce will wait for up to 90 seconds for the executable to finish.  timeout  is capped at 360 seconds and won't apply if  background  is set to  true.

timeout

(secondary key)

  

Identified Tunnels

If an identified tunnel is started using Sauce Connect, your jobs can choose to proxy through it using this set of keys with the right identifier. tunnelIdentifierstring"tunnelIdentifier": "MyTunnel01"

Shared Tunnels

This desired capability will let the test job use any shared tunnels available from the specified parent account. i.e. any account that is upstream in the hierarchy. This capability is required if using a Shared Tunnel If using a shared tunnel, you must specify both tunnelIdentifier and parentTunnel.parentTunnelstring"parentTunnel": "<username of parent>"

Specifying the Screen Resolution

This setting specifies which screen resolution should be used during the test session. This feature is available in:

  • Windows 7 (except Windows 7 with IE 9)
  • Windows 8 
  • Windows 8.1
  • Windows 10
Expand
titleResolutions Available for Windows 7
  • 800x600
  • 1024x768
  • 1152x864
  • 1280x768
  • 1280x800
  • 1280x960
  • 1280x1024
  • 1440x900
  • 1600x1200
  • 1680x1050
  • 1920x1080
  • 1920x1200
  • 2560x1600
Expand
titleResolutions Available for Windows 8, 8.1 and 10
  • 800x600
  • 1024x768
  • 1152x864
  • 1280x768
  • 1280x800
  • 1280x960
  • 1280x1024
  • 1400x1050
  • 1440x900
  • 1600x1200
  • 1680x1050
  • 1920x1080
  • 1920x1200
  • 2560x1600

 

  • OS X 10.9
  • OS X 10.10
  • OS X 10.11
  • macOS 10.2
Expand
titleResolutions Available for OS X 10.9
  • 800x600
  • 1024x768
  • 1152x720
  • 1152x864
  • 1152x900
  • 1280x720
  • 1280x768
  • 1280x800
  • 1280x960
  • 1280x1024
  • 1376x1032
  • 1440x900
  • 1600x900
  • 1600x1200
  • 1680x1050
  • 1920x1080
  • 1920x1200
  • 2048x1152
  • 2048x1536
Expand
titleResolutions Available for OS X 10.10
  • 800x600
  • 1024x768
  • 1152x720
  • 1152x864
  • 1152x900
  • 1280x720
  • 1280x768
  • 1280x800
  • 1280x960
  • 1280x1024
  • 1376x1032
  • 1440x900
  • 1600x900
  • 1600x1200
  • 1680x1050
  • 1920x1080
  • 1920x1200
  • 1920x1440
  • 2048x1152
  • 2048x1536
Expand
titleResolutions Available for OS X 10.11
  • 1024x768
  • 1152x864
  • 1280x960
  • 1376x1032
  • 1600x1200
  • 1920x1440
  • 2048x1536
Expand
titleResolutions Available for macOS 10.12
  • 1024x768
  • 1152x864
  • 1280x960
  • 1376x1032
  • 1400x1050
  • 1600x1200
  • 1920x1440
  • 2048x1536
  • 2360x1770


screenResolutionstring"screenResolution": "1280x1024"

Custom Time Zones

 

 

Desktop Test VMs can be configured with custom time zones. This feature should work on all operating systems, however time zones on Windows VMs are approximate. They will default to the time zone that the provided location falls into. You can find a complete list of timezones on Wikipedia. Underscores should be replaced with spaces. Sauce takes only location names (not their paths), as shown in the example below.timeZonestring"timeZone": "Los Angeles" 
"timeZone": "Honolulu" 
"timeZone": "Alaska" 
"timeZone": "New_York" 

Avoiding the Selenium Proxy

By default, Sauce routes traffic from some WebDriver browsers (Edge, Internet Explorer and Safari) through the Selenium HTTP proxy server so that HTTPS connections with self-signed certificates work everywhere. The Selenium proxy server can cause problems for some users. If that's the case for you, you can configure Sauce to avoid using the proxy server and have browsers communicate directly with your servers.

Tip
titleDon't Need the Selenium Proxy with Firefox or Google Chrome

Firefox and Google Chrome under WebDriver aren't affected by this flag as they handle invalid certificates automatically and there isn't a need to proxy through Selenium. 

Note
titleIncompatible with Sauce Connect Proxy

This flag is incompatible with Sauce Connect Proxy.

avoidProxyboolean"avoidProxy": true

Job Visibility

Sauce Labs supports several test result visibility levels, which control who can view the test details. The visibility level for a test can be set manually from the test results page, but also programatically when starting a test or with our REST API. For more information about sharing test result, see the topics under Sharing the Results of Sauce Labs Tests.

Available visibility levels are:

  
publicMaking your test public means that it is accessible to everyone, and may be listed on public web pages and indexed by search engines.
public restrictedIf you want to share your job's result page and video, but keep the logs only for you, you can certainly do so with public restricted visiblity mode. This visibility mode will hide the fancy job log as well as prohibit access to the raw Selenium log, so that anonymous users with the link will be able to watch the video and screen shots but won't be able to see what's being typed and done to get there.shareYou can also decide to make your test sharable. Making your test sharable means that it is only accessible to people having valid link and it is not listed on publicly available pages on saucelabs.com or indexed by search engines.
teamIf you want to share your jobs with other team members (that were created as a sub-accounts of one parent account), you can use team visiblity mode. Making your test acessible by team means that it is only accessible to people under the same root account as you.
privateIf you don't want to share your test's result page and video with anyone, you should use private job visibility mode. This way, only you (the owner) will be able to view assets and test result page.


publicstring
"public": "public"

...