Browser command - operation¶
- Browsers
This operation sends a specific command to the browser.
To perform this operation in the Suitest Test editor use the Browser command line:
To perform this operation in the Suitest JavaScript API use
the window
command in conjunction with
setSize
:
await suitest.window().setSize(1280, 720);
Browser command options¶
Test editor | JavaScript API | Description |
---|---|---|
Go back | goBack() |
moves backwards in the browsing history |
Go forward | goForward() |
moves forward through the navigation history |
Refresh | refresh() |
refreshes the page |
Set window size | setSize() |
sets the size of the browser's window to the specified width and height |
Accept modal dialog | acceptModal() |
Presses "Accept" or "Yes" on the modal dialog |
Accept prompt dialog with message | acceptModal() |
Submit a message string to the dialog and close it with "OK" |
Dismiss modal dialog | dismissModal() |
Presses "Cancel" or "No" on the modal dialog |
In the Suitest JavaScript API all browser command options are
used in conjunction with the window()
.