Web Action Documentation
Web actions are exposed in the Web Automation framework in Quality Modeller. The corresponding Git repository is available https://github.com/CuriositySoftwareIreland/TestModeller-JavaSeleniumFramework . This uses Selenium with Java as the underlying automation technology.
When the framework is imported into Quality Modeller, the actions below are available in the 'WebGeneralActions' module. This provides an accelerator for automating common actions on web devices. This class can be extended to incorporate your own keywords and actions as necessary.
QuickStart Web Test Automation
To learn how you can quickly get started with Web Automation in Quality Modeller, check out our QuickStart guide: QuickStart Web Automation
Location Strategy
All keywords in the Quality Modeller WebGeneralActions library that need to find an element on the page take a locator argument. Locator is a string that describes how to locate an element using a syntax specifying different location strategies.
Strategy | Example |
---|---|
XPath | xpath://input[id="username"] |
Id | id:usernameId |
Class | class:username |
Css | css:#usernameId |
name | accessibilityId:usernameObj |
linktext | linktext:login |
text | text:inputusername |
tagname | tagname:button |
Web Actions
Add Cookie (String name, String value)Arguments name - Name of the cookie value - Value of the cookie Documentation |
---|
Alert Should Be PresentDocumentation |
---|
Alert Assert Text (String text)Arguments text - Text to assert in the alert message. Documentation |
---|
Checkbox Should Be Selected (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Checkbox Should Not Be Selected (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Clear Element Text (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Assert Current Frame Contains (String text)Arguments Text - Text to assert the frame contains. Documentation |
---|
Assert Current Frame Does Not Contain (String text)Arguments text - Text to assert the frame does not contain. Documentation |
---|
Delete All CookiesDocumentation |
---|
Delete Cookie (String name)Arguments name - Name of the cookie to delete. Documentation |
---|
Drag And Drop (String fromLocator, String targetLocator)Arguments fromLocator - The object identifier to drag from. See locator strategy above. toLocator - The object identifier to drag to. See locator strategy above. Documentation |
---|
Drag And Drop By Offset (String objectLocator, Integer xPos, Integer yPos)Arguments objectLocator - The object identifier of the object to drag. See locator strategy above. xPos - X offset to perform drag. yPos - Y offset to perform drag Documentation |
---|
Element Attribute Value Should Be (String objectLocator, String elementAttribute, String attributeValue)Arguments objectLocator - The object identifier. See locator strategy above. elementAttribute - Element attribute to retrieve value. elementValue - Value to check element attribute is set to. Documentation |
---|
Element Should Be Disabled (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Element Should Be Enabled (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Element Should Be Focused (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Element Should Be Visible (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Element Should Contain (String objectLocator, String message)Arguments objectLocator - The object identifier. See locator strategy above. message - Message to check element contains Documentation |
---|
Element Should Not Be Visible (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Element Should Not Contain (String objectLocator, String message)Arguments objectLocator - The object identifier. See locator strategy above. message - Message to check element does not contain. Documentation |
---|
Element Text Should Be (String objectLocator, String text)Arguments objectLocator - The object identifier. See locator strategy above. text - Text element should be set to. Documentation |
---|
Element Text Should Not Be (String objectLocator, String text)Arguments objectLocator - The object identifier. See locator strategy above. text - Text element should not be set to. Documentation |
---|
Execute Javascript (String javaScript)Arguments javaScript - Javascript code to execute. Documentation |
---|
Frame Should Contain (String objectLocator, String text)Arguments objectLocator - The object identifier. See locator strategy above. text - Text to check frame contains. Documentation |
---|
Get Element Attribute (String objectLocator, String attribute)Arguments objectLocator - The object identifier. See locator strategy above. attribute - Attribute value to return Documentation |
---|
Get Text (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Get TitleDocumentation |
---|
Get Value (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Go BackDocumentation |
---|
Accept AlertDocumentation |
---|
Dismiss AlertDocumentation |
---|
Input Text Into Alert (String text)Arguments Text - Text to input into alert message. Documentation |
---|
Mouse Down (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Mouse Out (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Mouse Over (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Mouse Up (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Open Context Menu (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Page Should Contain Text (String text)Arguments text - Text the page should contain Documentation |
---|
Page Should Contain Element (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Page Should Not Contain Text (String text)Arguments text - Text that the page should not contain. Documentation |
---|
Page Should Not Contain Element (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Radio Button Should Be Set To (String groupName, String value)Arguments groupName - Name of the radio group value - Value of the selected radio button. Documentation |
---|
Radio Button Should Not Be Selected (String groupName, String value)Arguments groupName - Name of the radio group value - Value of the unselected radio button. Documentation |
---|
Reload PageSimulates user reloading page. |
---|
Scroll Element Into View (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Select All From List (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Select Checkbox (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Selects the checkbox identified by locator. |
---|
Select From List By Index (String objectLocator, Integer index)Arguments objectLocator - The object identifier. See locator strategy above. index - Index of the list item to select. Documentation |
---|
Select From List By Label (String objectLocator, String label)Arguments objectLocator - The object identifier. See locator strategy above. label - Label of the list item to select. Documentation |
---|
Select From List By Value (String objectLocator, String value)Arguments objectLocator - The object identifier. See locator strategy above. value - Value of the list item to select. Documentation |
---|
Select Radio Button (String groupName, String value)Arguments groupName - Name of the radio button group. value - Value to select. Documentation |
---|
Submit Form (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Title Should Be (String value)Arguments value - Title of the page should be. Documentation |
---|
Unselect All From List (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Unselect Checkbox (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Unselect From List By Index (String objectLocator, Integer index)Arguments objectLocator - The object identifier. See locator strategy above. index - Index of the list item to unselect. Documentation |
---|
Unselect From List By Label (String objectLocator, String label)Arguments objectLocator - The object identifier. See locator strategy above. label - Label of the list item to unselect. Documentation |
---|
Unselect From List By Value (String objectLocator, String value)Arguments objectLocator - The object identifier. See locator strategy above. value - Value of the list item to unselect. Documentation |
---|
Wait Until Element Is Enabled (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Wait Until Element Is Not Visible (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Wait Until Element Is Visible (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Wait Until Page Contains Element (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Switch TabArguments tabIndex - Index of the tab to switch to. Documentation |
---|
New WindowDocumentation |
---|
Open URL (String url)Arguments url - Url to open in the browser. Documentation |
---|
Click (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Documentation |
---|
Enter Text (String objectLocator, String text)Arguments objectLocator - The object identifier. See locator strategy above. text - Text to input into the object. DocumentationTypes the given text into the element identified by locator. |
---|
Double Click (String objectLocator)Arguments objectLocator - The object identifier. See locator strategy above. Double clicks the element identified by locator. |
---|