id | title | sidebar_label |
---|---|---|
windows |
Install Sauce Connect on Windows |
Windows |
import useBaseUrl from '@docusaurus/useBaseUrl'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
On Windows 10 and newer you can install Sauce Connect with the builtin winget package manager. This is the recommended way to install Sauce Connect on Windows.
Open Terminal and run the following command to install Sauce Connect:
winget install SauceLabs.SauceConnect
Sauce Connect for Windows installs the sauce-connect
command not sc
.
This is due to the fact that the sc
command is already used by the system.
To work around this issue, you can set an alias for the sauce-connect
command.
In Terminal run the following command to permanently set the sc
alias for sauce-connect
:
if (-Not (Test-Path -Path $PROFILE)) {
New-Item -ItemType File -Path $PROFILE -Force
}
Add-Content -Path $PROFILE -Value "Set-Alias -Name 'sc' -Value 'sauce-connect' -Option 'AllScope' -Force"
Open a new Terminal window to use the sc
command for Sauce Connect.
In Terminal run the following script to add sc
command completion to PowerShell:
if (-Not (Test-Path -Path $PROFILE)) {
New-Item -ItemType File -Path $PROFILE -Force
}
Add-Content -Path $PROFILE -Value "Invoke-Expression (sauce-connect completion powershell | Out-String)"
Open a new Terminal window to use the sc
command with completion.
This step is optional. You can use default configuration or configure Sauce Connect with flags or environment variables. See CLI reference for more details.
Get the default configuration file:
sc run config-file > sauce-connect.yaml
Edit the configuration file with your favorite editor:
notepad sauce-connect.yaml
sc run --config-file sauce-connect.yaml
Sauce Connect provides .zip
package that can be used on older Windows versions that do not support winget.
mkdir C:\sauce-connect
Invoke-WebRequest -Uri https://saucelabs.com/downloads/sauce-connect/5.2.2/sauce-connect-5.2.2_windows.x86_64.zip -OutFile sauce-connect.zip
Expand-Archive -Path sauce-connect.zip -DestinationPath C:\sauce-connect
Rename-Item -Path C:\sauce-connect\sauce-connect.exe -NewName C:\sauce-connect\sc.exe
This step is optional. You can use default configuration or configure Sauce Connect with flags or environment variables. See CLI reference for more details.
Get the default configuration file:
cd C:\sauce-connect
./sc.exe run config-file > sauce-connect.yaml
Edit the configuration file with your favorite editor:
notepad sauce-connect.yaml
./sc.exe run --config-file sauce-connect.yaml