PowerShell

Because PowerShell is a scripted language, and not a compiled language, it is easier to create and edit scripts as you go.

Note however, all the scripts written in PowerShell can easily be written in Java or C#.

Install PowerShell

Make sure the latest PowerShell is installed. We recommend to install PowerShell 5 or higher. $PSVersionTable displays the version.

On Windows, PowerShell comes installed by default in every Windows, starting with Windows 7 SP1 and Windows Server 2008 R2 SP1. In case your PowerShell version is lower than 5 please do upgrade PowerShell or install PowerShell Core. For more information refer to: install Windows PowerShell.

PowerShell Core (available for Linux, macOS and Windows)

To install PowerShell Core you can follow the instructions on:

PowerShell editor

You can use any text editor to write your PowerShell scripts.

Some editors provide additional scripting support:

  • Windows PowerShell ISE:

    1. Click on Windows Start
    2. Launch Windows PowerShell ISE application.
  • Visual Studio Code is a cross platform code editor and has a decent PowerShell (ms-vscode.powershell) extension including syntax highlighting, autocomplete and shell

Automate with PowerShell

The Quamotion PowerShell module is required to have access to the Quamotion WebDriver functions.

Copy and Paste the following command to install the Quamotion PowerShell module

Install-Module -Name Quamotion.PowerShell

If needed modify the execution policy for PowerShell. Please find more information about this function on https://technet.microsoft.com/en-us/library/ee176961.aspx

Set-ExecutionPolicy Unrestricted
Accept-Alert
Read More…
Add-App
Read More…
Add-DeveloperDisk
Read More…
Add-DeveloperProfile
Read More…
Add-License
Read More…
Clear-ElementText
Read More…
Clear-Text
Read More…
Click-AlertButton
Read More…
Click-Coordinate
Read More…
Click-Element
Read More…
Close-Window
Read More…
ConnectTo-Quamotion
Read More…
Delete-AppSettings
Read More…
Dismiss-Alert
Read More…
Dismiss-Keyboard
Read More…
DoubleClick-Element
Read More…
Enable-LocationServices
Read More…
Enter-Text
Read More…
Execute-Script
Read More…
Find-Element
Read More…
Find-ElementByCoordinate
Read More…
Find-ElementById
Read More…
Find-ElementFlex
Read More…
Find-Elements
Read More…
Find-ElementsById
Read More…
Flick-Coordinate
Read More…
Flick-Element
Read More…
Get-AlertButtons
Read More…
Get-AlertText
Read More…
Get-App
Read More…
Get-AppVersion
Read More…
Get-BatteryInfo
Read More…
Get-CurrentSessionId
Read More…
Get-Device
Read More…
Get-DeviceProcess
Read More…
Get-DeviceRotation
Read More…
Get-DeviceSessions
Read More…
Get-DeviceSetting
Read More…
Get-DeviceSettings
Read More…
Get-DiskInfo
Read More…
Get-ElementProperties
Read More…
Get-ElementProperty
Read More…
Get-ElementRectangle
Read More…
Get-ElementText
Read More…
Get-EndPoints
Read More…
Get-ErrorMessage
Read More…
Get-InstalledApp
Read More…
Get-MapBounds
Read More…
Get-MapCenter
Read More…
Get-MapMarkers
Read More…
Get-MapZoom
Read More…
Get-Orientation
Read More…
Get-PerformanceData
Read More…
Get-Screenshot
Read More…
Get-SessionLog
Read More…
Get-Sessions
Read More…
Get-Source
Read More…
Get-Timeouts
Read More…
Get-Url
Read More…
Get-WebDriverStatus
Read More…
Get-WindowHandle
Read More…
Get-WindowHandles
Read More…
Get-WindowSize
Read More…
Go-Back
Read More…
Go-ToHomeScreen
Read More…
Import-DeveloperDisks
Read More…
Install-App
Read More…
Invoke-WebDriverRestMethod
Read More…
Invoke-WebDriverWebRequest
Read More…
Is-Displayed
Read More…
LongClick-Element
Read More…
Navigate-To
Read More…
New-DeveloperProfile
Read More…
New-DeviceSession
Read More…
New-Session
Read More…
New-WebSession
Read More…
Reboot-Device
Read More…
Reload-Page
Read More…
Remove-App
Read More…
Remove-Session
Read More…
Report-Status
Read More…
Reset-DeviceOrientation
Read More…
Rethrow-Exception
Read More…
Scroll-To
Read More…
Scroll-ToVisible
Read More…
ScrollDown-To
Read More…
ScrollUp-To
Read More…
Set-CurrentSessionId
Read More…
Set-DeviceOrientation
Read More…
Set-DeviceSetting
Read More…
Set-ElementProperty
Read More…
Set-GeoLocation
Read More…
Set-MapCenter
Read More…
Set-MapZoom
Read More…
Set-Orientation
Read More…
Set-Timeout
Read More…
Set-Value
Read More…
Set-Window
Read More…
Start-App
Read More…
Stop-Agent
Read More…
Stop-DeviceProcess
Read More…
Stop-InstalledApp
Read More…
Submit-Element
Read More…
Test-Element
Read More…
Test-Elements
Read More…
Test-SessionId
Read More…
Uninstall-App
Read More…
Wait-Device
Read More…