Testing with Bqurious > Actions
Perform Actions
Perform actions are action keywords that help you perform basic operations on an element.
Suppose you wish to perform click on an element.
Structure :
launchApp <parameters>
verifyElementVisible <parameters>
click <parameters>
IMPORTANT
All keywords under this list hard fail in negative scenarios.
| Action | Parameters | Example Usage |
|---|---|---|
click Web, Mobile --- To perform the click operation on object (mentioned in objectName). | Example : click : <Object : bqObject> Clicks on the mentioned object bqObject. | |
closeWindowByTitle Web --- To close the window using title (mentioned in Parameter 1). | Param 1 : Window title to close | Example : closeWindowByTitle : <Title : bqurious features> Closes the window with title bqurious features |
clickOnLinkByText Web --- To click on the link by text (mentioned in Parameter 1) inside the frame (Frame path or Index mentioned in Parameter 3) with index (mentioned in Parameter 2) using Javascript. > [!IMPORTANT] If index is not mentioned, the first instance of link will be clicked inside the frame using Javascript. If parameter 4 is not provided, click will be performed with BQ. | Param 1 : Link Text to click on Param 2 : Index of link Param 3 : Name / Index of Frame Param 4 : Execute using JavaScript | Example : clickOnLinkByText : <Link Text : bqurious> <Index : 1> <Frame Name/Index : 1> <Execute using Javascript : true> Clicks on first instance of link bqurious inside the frame index 1, using Javascript. |
clickAtXY Web --- To click at specific location using coordinates. | Param 1 : X-coordinate Param 2 : Y-coordinate | Example : clickAtXY : <X-coordinate : 120> <Y-coordinate : 178> Clicks at 120,178 coordinates. |
clickOnElementWithOffset Web, Mobile --- To perform the click operation on object (mentioned in objectName) using x-offset % (mentioned in Parameter 1) and y-offset % (mentioned in Parameter 2). | Param 1 : X-coordinate(%) Param 2 : Y-coordinate(%) | Example : clickOnElementWithOffset : <Object : bqObject> <X-coordinate(%) : -50> <Y-coordinate(%) : -50> Clicks on bqObject with -50% and -50% offset from left side. |
clickLinkByText Web --- To click on the link (mentioned in Parameter 1) at index (mentioned in Parameter 2). > [!NOTE] If index is not mentioned, the first instance of link will be clicked. If True is provided in parameter 3, javascript will be used to click internally. | Param 1 : Link text to be clicked Param 2 : Index of the Link Param 3 : Execute the action using javascript | Example : clickLinkByText : <Object : > <Link Text : bqurious> <Index : > <Execute using javascript : True> Clicks on first instance of bqurious using Javascript clickLinkByText : <Object : bqObject> <Link Text : bqurious> <Index : 2> <Execute using javascript : False> Clicks on the second instance of bqurious, under the object bqObject |
collapseNode Web --- To collapse the tree node (KEY or PATH mentioned in Parameter 1) from UITree (mentioned in Object Name). Node Path is not applicable for Web. > [!NOTE] Node Path is not applicable for Web. | Param 1 : Node key or node path | Example 1 : collapseNode : <Object : UITree> <Node Key or Path : director> Collapses node director from UITree. Example 2 : collapseNode : <Object : UITree> <Node Key or Path : SAP WEB/FINANCIALS/ACCOUNTS> Collapses node path SAP WEB/FINANCIALS/ACCOUNTS (for SAP) from UITree. |
clickGridItemByIndex Mobile --- To click the grid item with index (mentioned in Parameter 1) in grid object (mentioned in objectName). | Param 1 : Option at index | Example : clickGridItemByIndex : <Object : bqGrid> <Option at Index : 3> Clicks on the grid item at index 3 in grid object bqGrid. |
closeApp Mobile --- To close the application which is currently open in simulator or device. | Example : closeApp Closes the currently open mobile application. | |
deSelectCheckBox Web, Mobile --- To de-select the check-box object (mentioned in objectName). > [!NOTE] If the checkbox is already de-selected, the particular step will fail. | Example : deSelectCheckbox : <Object : bqCheckbox> De-selects the check-box bqCheckbox | |
doubleClick Web --- To perform the double-click operation on object (object mentioned in objectName). | Example : doubleClick : <Object : bqObject> Performs double-click on object bqObject. | |
doubleClickAtXY Web --- To double-click at a specific location using coordinates. | Param 1 : X-coordinate Param 2 : Y-coordinate | Example : doubleClickAtXY : <X-coordinate : 120> <Y-coordinate : 178> Double-clicks at 120,178 coordinates. |
doubleTap Mobile --- To perform the double tap operation on the object (mentioned in ObjectName). > [!NOTE] If object is not mentioned then double tap will be performed on X,Y coordinates percentage mentioned. If object, X and Y coordinates are not mentioned then double tap will be performed at center. | Param 1 (Optional) : Offset X(%) Param 2 (Optional) : Offset Y(%) | Example 1 : doubleTap : <Object : bqMobileObject> <Offset X(%) : > <Offset Y(%) : > Performs the double tap operation on the bqMobileObject Example 2 : doubleTap : <Object : > <Offset X(%) : 120> <Offset Y(%) : 178> Performs the double tap operation on mentioned x & y offset (%). Example 3 : doubleTap : <Object : > <Offset X(%) : > <Offset Y(%) : > Performs the double tap operation at the center. |
expandNode Web --- To expand the tree node (KEY or PATH mentioned in Parameter 1) from UITree (mentioned in Object Name). > [!NOTE] Node Path is not applicable for Web. | Param 1 : | Example : expandNode |
focusOnElement Web --- To place the focus on object (mentioned in objectName). | Example : focusOnElement : <Object : bqObject> Focuses on object bqObject. | |
installApp Mobile --- To install the application (mentioned in Parameter 1) on device. | Param 1 : Select the Mobile Application | Example : installApp : <Mobile Application : bqurious> Installs the application bqurious on device. |
launchApp Web --- To Launch the application of the specified URL (value mentioned in Parameter 1), with User and Password specified in Param 2 and 3 in case of Basic Auth. | Param 1 : Url to be launched Param 2 (Optional) : Username for Basic Auth Param 3 (Optional) : Password for Basic Auth | Example 1 : launchApp : <URL : http://www.bqurious.com> <User : > <Password : > Launches URL <http://www.bqurious.com> Example 2 : launchApp : <URL : https://dummyUser:[email protected]> <User : > <Password : > Launches URL https://exampleurl.com by using the provided Basic Auth credentials Example 3 : launchApp : <URL : https://exampleurl.com> <User : dummyUser> <Password : password1> Launches URL https://exampleurl.com by using the provided Basic Auth credentials |
launchAppOnDevice Mobile --- To launch the mobile application on simulator or device without resetting the application. > [!NOTE] Default is false, to reset the application data before launching the application. | Param 1 (Optional) : Ignore Reset (true / false) | Example 1 : launchAppOnDevice : <Ignore Reset : true> Launches the mobile application without resetting the application data. Example 2 : launchAppOnDevice : <Ignore Reset : > Default value fetched will be false. Launches the mobile application without resetting the application data. |
longTap Mobile --- To perform the long tap operation on the object (mentioned in ObjectName). > [!NOTE] If object is not mentioned, long tap will be performed on X,Y coordinates percentage mentioned. If object, X and Y coordinates are not mentioned, long tap will be performed at center. | Param 1 (Optional) : Offset X(%) Param 2 (Optional) : Offset Y(%) | Example 1 : longTap : <Object : bqMobileObject> <Offset X(%) : > <Offset Y(%) : > Performs long tap operation on the bqMobileObject Example 2 : longTap : <Object : > <Offset X(%) : 120> <Offset Y(%) : 178> Performs long tap operation on mentioned x & y offset (%). Example 3 : longTap : <Object : > <Offset X(%) : > <Offset Y(%) : > Performs long tap operation at the center. |
mouseOver Web --- To place the mouse onto the object (mentioned in objectName). | Example : mouseOver : <Object : bqObject> Places the mouse onto the object bqObject | |
navigateBackOnDevice Mobile --- To navigate to previous screen. | Example : navigateBackOnDevice Navigates to the previous screen. | |
pressRemoteButton Mobile --- To press button (mentioned in Parameter 1) for number of times (mentioned in Parameter 2). > [!NOTE] If number of times is not mentioned, mentioned button will be pressed only once. | Param 1 : Name of the button Param 2 : Number of times the button should be pressed | Example : pressRemoteButton : <Button Name : down button> <No of Times : 5> Clicks the down button for 5 times to reach the appropriate element |
rightClick Web --- To perform the right-click operation on object (mentioned in objectName). | Example : rightClick : <Object : bqObject> Performs right-click on object bqObject. | |
rightClickAtXY Web --- To perform right-click at a specific location using coordinates. | Param 1 : X-coordinate Param 2 : Y-coordinate | Example : rightClickAtXY : <X-coordinate : 120> <Y-coordinate : 178> Performs right-click at 120,178 coordinates. |
selectCheckBox Web, Mobile --- To select the check-box object (mentioned in objectName). > [!NOTE] If the checkbox is already selected, the particular step will fail. | Example : selectCheckbox : <Object : bqCheckbox> Selects the check-box bqCheckbox | |
setValue Web, Mobile --- To enter the value (mentioned in Parameter 1) in edit-box object (mentioned in objectName) or the pre-focused edit-box (when no object is provided). | Param 1 : Value to be set Param 2 (Optional) : The execution mode > [!IMPORTANT] If it needs to be executed using sendKeys then enter method2 in Parameter 2. | Example 1 : setValue : <Object : bqTextbox> <Value : Bqurious> <Execution Mode : > Sets Bqurious in edit-box bqTextbox Example 2 : setValue : <Value : Bqurious> <Execution Mode : > Sets Bqurious in the pre-focused edit-box |
setValueOnReadOnlyField Web --- To enter the Value (mentioned in Parameter 1) in text box which is read-only. | Param 1 : Value to set | Example : setValueOnReadOnlyField : <Object : bqTextboxReadOnly> <Value : 41237> Enters 41237 in object bqTextboxReadOnly. |
switchToWindowByTitle Web --- To shift the control from one window to another using title of the window to perform actions. > [!NOTE] The keyword functionality also works when partial title is provided. | Param 1 : Window title to switch to Param 2 (Optional) : Timeout | Example : switchToWindowByTitle : <Title : bqVariable> <Timeout : > Switches to window that has title bqVariable, from the previous window |
selectRadioButton Web, Mobile --- To select the radio-button (mentioned in objectName). | Example : selectRadioButton : <Object : bqRadiobutton> Selects the radio-button object bqRadiobutton. | |
scrollElementIntoView Web --- To scroll the page to make the object (mentioned in object name) visible on the screen. | Example : scrollElementIntoView : <Object : bqObject> Scrolls the element bqObject to make it visible on the screen. | |
selectDefaultFrame Web --- To switch control to top window or default frame to perform actions. | Example : selectDefaultFrame Shifts the control to the top window of the webpage | |
selectValueInListByIndex Web --- To select the value from dropdown/multi-select object (mentioned in objectName) using index. | Param 1 : Index | Example : selectValueInListByIndex : <Object : bqSelectbox> <Option at Index : 12> Selects value from object bqSelectbox at index 12. |
selectByTextInList Web, Mobile --- To select the specific option (mentioned in Parameter 1) on object (mentioned in objectName). | Param 1 : List Item text to select | Example : selectByTextInList : <Object : bqSelectbox> <List Item Text to Select : Option1> Selects Option1 from select box object bqSelectbox. |
setFile Web --- To select the file name located at (Mentioned in Parameter 1) from the file system. | Param 1 : File name with path | Example : setFile : <File Name with Path : d:/bqLocation/bqurioushelp.docx> Selects the file name located at d:/bqLocation/bqurioushelp.docx from the file-system. |
switchApp Web, Mobile --- To switch the application type from Web to Applet or Applet to Web. > [!NOTE] Please use useDevice keyword after using switchAp, when you navigate from Web to Mobile, so that the application to be launched can be specified. | Param 1 : Switch to type of application Param 2 (Optional) : Title of the Web Window | Example : switchApp : <Application Type : Mobile Native> <Web Window Title : > Switches to application type Mobile Native. |
switchMobileApp Mobile --- To switch to mobile native application that has the specific bundle name (mentioned in Parameter 1). | Param 1 : Package / Bundle Name Param 2 (Optional) : Activity Name (if Android) | Example : switchMobileApp : <Package/Bundle Name : com.bq.mobile.native> <Activity Name(if Android) : > Switches to native application with package name com.bq.mobile.native on iOS device |
switchMobileBrowser Mobile --- To switch to mobile browser. | Example : switchMobileBrowser Switches to mobile browser on device. | |
setValueInExcelCell Web, Mobile --- To enter the value (mentioned in parameter 1) at column (column name or index mentioned in parameter 2) and row index (mentioned in parameter 3). | Param 1 : Value to set Param 2 : Name or Index of Column Param 3 : Index of Row | Example : setValueInExcelCell <Value : 23456> <Column Name/Index : Case Number> <Row Index : 2> Enters the value 23456 at column Case Number and row index 2. |
setExcelProps Web, Mobile --- To configure the excel file properties. | Param 1 : Name of the excel sheet Param 2 : Index of the Header Row | Example : setExcelProps : <Sheet Name : Sheet3> <Header Row Index : 1> Configures the sheet name Sheet3 and header row index is 1. |
setDataRow Web, Mobile --- To set the row in data file at row number mentioned in Parameter 1 | Param 1 : The row number to start | Example : setDataRow : <Row Number : 2> Sets the row in data file as 2 |
setExcelRow Web, Mobile --- To set the row in excel file at row number mentioned in Parameter 1. | Param 1 : The row number to start | Example : setExcelRow : <Row Number : 3> Sets the row in excel file, at row number 3 |
selectTab Mobile --- To select the tab (mentioned in Parameter 1) from TabStrip (mentioned in Object Name) using text. | Param 1 : Name of the tab | Example : selectTab : <Object : AssetTabStrip> <Tab Name : Allocation> Selects Allocation tab from Tab Strip AssetTabStrip. |
selectItemByTextInSpinner Mobile --- To select the spinner item text (mentioned in Parameter 1) in spinner object (mentioned in objectName). | Param 1 : Item Text | Example : selectItemByTextInSpinner : <Object : bqSpinner> <Item Text : spinner1> Selects spinner1 in spinner bqSpinner. |
selectItemByIndexInSpinner Mobile --- To select the item in spinner object (mentioned in objectName) using index (mentioned in Parameter 1). | Param 1 : Option at index | Example : selectItemByIndexInSpinner : <Object : bqSpinner> <Option at Index : 12> Selects item in spinner object bqSpinner at index 12. |
selectGalleryItemByIndex Mobile --- To select the gallery item with index (index mentioned in Parameter 1) from gallery object (mentioned in Object Name). | Param 1 : Item at Index | Example : selectGalleryItemByIndex : <Object : bqGallery> <Item at Index : 12> Selects gallery item that has index 12 in object bqGallery. |
setLocationLatLong Mobile --- To set the location using latitude (mentioned in Parameter 1), longitude (mentioned in Parameter 2), and altitude (mentioned in Parameter 3). | Param 1 : Location Latitude Param 2 : Location Longitude Param 3 : Location Altitude | Example : setLocationLatLong : <Latitude : 89.9> <Longitude : 78.98> <Altitude : 25.8> Sets the location using latitude 89.9, longitude 78.98 and altitude 25.8. |
setLocationAddress Mobile --- To set the location address. | Param 1 : Location address | Example : setLocationAddress : <Address : BQ Office> Sets the location address as BQ Office. |
switchToWebViewContext Mobile --- To switch the context to Web view on device. | Example : switchToWebViewContext Switches the context to Web View on device. | |
switchToMobileContext Mobile --- To switch the context to Mobile on device. | Example : switchToMobileContext Switches the context to Mobile on device. | |
tap Mobile --- To perform the tap operation on the object (mentioned in ObjectName). > [!NOTE] If object is not mentioned, tap will be performed on X,Y coordinates percentage mentioned. If object, X and Y coordinates are not mentioned, tap will be performed at center. | Param 1 : Offset X(%) Param 2 : Offset Y(%) | Example : tap : <Object : bqMobileObject> <Offset X(%) : > <Offset Y(%) : > Performs long tap operation on the bqMobileObject. Example 2 : tap : <Object : > <Offset X(%) : 120> <Offset Y(%) : 178> Performs tap operation on mentioned x & y offset (%). Example 3 : tap : <Object : > <Offset X(%) : > <Offset Y(%) : > Performs tap operation at the center. |
useDevice Mobile --- To switch device to device (mentioned in parameter 2) to integrate with a different mobile application. | Param 1 : Name of the Mobile Application Param 2 : Name of the device Param 3 : UDID of device Param 4 : OS Version Param 5 : OS Type | Example : useDevice : <Mobile Application : application-02> <Device Name : iosDevice> <Device UDID : ios01> <OS Version : 7.0> <OS Type : IOS> Switches to device iosDevice with UDID as ios01, version as 7.0 & OS type as IOS to integrate with application-02. |
