Documentation

Looking for something in particular?

NitroX Interactions

Below are interactions for your custom components that NitroX supports by default.

1. Click = function(element, sync, autowaits, events)

  • Description: Clicks on the element.
  • Parameters:

        element: The element to click on.

            type: DOM element

        sync: If true, the click will be synchronous. 

            type: Boolean

        autowaits: The autowaits to use for the action.

            type: Array of strings

            default autowaits : [‘attached’, ‘visible’, ‘stable’, ‘receives events’, ‘enabled’];

        events: The events to dispatch after the click. 

            type: Array of strings

            default events : no default events.

"javaScriptSnippet": "js::yield interactions.click(element);"
"javaScriptSnippet": "js::yield interactions.click(element, true);"
"javaScriptSnippet": "js::yield interactions.click(element.shadowRoot.querySelector('button'), false, ['attached', 'visible'], ['change', 'blur', 'focusout']);"    

2. Set = function(element, value, elementLabel, eventsAfter, eventsBefore, autowaits)

  • Description: Sets the value of the element.
  • Parameters:

        element: The element to set the value for.

            type: DOM element

        value: The value to set. 

            type: String

        elementLabel: The label of the element to be shown in the logs. 

            type: String

        eventsAfter: The events to dispatch after setting the value. 

            type: Array of strings

            default eventsAfter : [‘input’, ‘change’, ‘blur’]

        eventsBefore: The events to dispatch before setting the value. 

            type: Array of strings

            default eventsBefore : no default events.

        autowaits: The autowaits to use for the action. 

            type: Array of strings

            default autowaits : [‘attached’, ‘visible’, ‘enabled’, ‘editable’];

"javaScriptSnippet": "js::yield interactions.set(element,  arguments[1]);"  
"javaScriptSnippet": "js::yield interactions.set(element,  arguments[1], 'inputField');"
"javaScriptSnippet": "js::yield interactions.set(element,  arguments[1], 'inputField', ['input', 'change', 'blur'], ['focusin', 'focusout'], ['attached', 'visible', 'enabled', 'editable']);"
**arguments[1] is the value entered in the text box in the TB.**

3. GetAttribute = function(element, attributeName, postProcessor, isJsProperty)

  • Description: Gets the attribute value of the element.
  • Parameters:

        element: The element to get the attribute value from.

            type: DOM element

        attributeName: The name of the attribute to get.

            type: String

        postProcessor: The post processor function to apply to the attribute value.

            type: String

        isJsProperty: If true, the attribute is a JavaScript property. If false, the attribute is an HTML attribute.

            type: Boolean

"javaScriptSnippet": "return yield interactions.getAttribute(element, 'textContent', null);"
"javaScriptSnippet": "return yield interactions.getAttribute(element, 'href', null, false);"
"javaScriptSnippet": "return yield interactions.getAttribute(element, 'countryOptions', 'const listArray = JSON.parse(JSON.stringify(value)); return listArray && listArray.length && Array.isArray(listArray) ? listArray.map(m=>m.label).join(\\', \\') : listArray')"
"javaScriptSnippet": "return yield interactions.getAttribute(element, 'textContent', 'if (value) {return value.trim();} else { return value;}');"
"javaScriptSnippet": "return yield interactions.getAttribute(element, 'columns', 'const listArray = JSON.parse(JSON.stringify(value)); return listArray' , false);"

4. SetAttribute = function(element, attribute, value, eventsAfter, elementLabel, eventsBefore, autowaits)

  • Description: Sets the attribute value of the element.
  • Parameters:

        element: The element to set the attribute value for.

            type: DOM element

        attribute: The name of the attribute to set.

            type: String

        value: The value to set.

            type: String

        eventsAfter: The events to dispatch after setting the attribute value.

            type: Array of strings

            default eventsAfter : no default events.

        elementLabel: The label of the element to be shown in the logs.

            type: String

        eventsBefore: The events to dispatch before setting the attribute value.

            type: Array of strings

            default eventsBefore : no default events.

        autowaits: The autowaits to use for the action.

            type: Array of strings

            default autowaits : [‘attached’, ‘visible’, ‘stable’, ‘receives events’, ‘enabled’];

"javaScriptSnippet": "js::yield interactions.setAttribute(element, 'value',  arguments[1]);"
"javaScriptSnippet": "js::yield interactions.setAttribute(element, 'checked',  arguments[1], ['input', 'change', 'blur'], 'inputField', ['focusin', 'focusout'], ['attached', 'visible', 'enabled', 'editable']);"
"javaScriptSnippet": "js::yield interactions.setAttribute(element, 'selected',  arguments[1], ['change', 'blur', 'focusout']);"
**arguments[1] is the value entered in the text box in the TB.**

5. Hover = function(element)

  • Description: Hover over the element.
  • Parameters:

        element: The element to hover over.

"javaScriptSnippet": "js::yield interactions.hover(element);"

6. SetNow = function(element, isDateField)

  • Description: Sets the value of the element to the current date or time.
  • Parameters:

        element: The element to set the value for.

            type: DOM element

        isDateField: If true, the value will be set to the current date. If false, the value will be set to the current time.

            type: Boolean

"javaScriptSnippet": "js::yield interactions.setNow(element, true);"
"javaScriptSnippet": "js::yield interactions.setNow(element, false);"

7. SetForCheckBoxGroup = function(element, options, value)

  • Description: Sets the value of the checkbox group.
  • Parameters:

        element: The element to set the value for.

            type: DOM element

        tpions: The list of checkboxes to be checked or unchecked.

            type: String seprated by comma

        value: The value to set.

            type: Boolean

"javaScriptSnippet": "js::yield interactions.setForCheckBoxGroup(element, arguments[1], true);"
"javaScriptSnippet": "js::yield interactions.setForCheckBoxGroup(element, arguments[1], false);"
**arguments[1] is the value entered in the text box in the TB.**

8. SetAllCheckBoxGroup = function(element, value)

  • Description: Sets the value of all checkboxes in the group.
  • Parameters:

        element: The element to set the value for.

            type: DOM element

        value: The value to set.

            type: Boolean

"javaScriptSnippet": "js::yield interactions.setAllCheckBoxGroup(element, true);"
"javaScriptSnippet": "js::yield interactions.setAllCheckBoxGroup(element, false);"

9. SetForLightningLookUp = function(element, value)

  • Description: Sets the value of the lightning lookup.
  • Parameters:

        element: The element to set the value for.

            type: DOM element

        value: The value to set.

            type: String

"javaScriptSnippet": "js::yield interactions.setForLightningLookUp(element, arguments[1]);"
**arguments[1] is the value entered in the text box in the TB.**

10. ShowAllResultsForLightningLookUp = function(element, value)

  • Description: Shows all results for the lightning lookup.
  • Parameters:

        element: The element to show all results for.

            type: DOM element

        value: The value to set.

            type: String

"javaScriptSnippet": "js::yield interactions.showAllResultsForLightningLookUp(element, arguments[1]);"
**arguments[1] is the value entered in the text box in the TB.**

11. SetforSelect = function(element, value)

  • Description: Sets the value of the select element.
  • Parameters:

        element: The element to set the value for.

            type: DOM element

        value: The value to set.

            type: String

"javaScriptSnippet": "js::yield interactions.setforSelect(element, arguments[1]);"
**arguments[1] is the value entered in the text box in the TB.**

12. SetForComboBox = function(element, value, elementLabel)

  • Description: Sets the value of the combobox.
  • Parameters:

        element: The element to set the value for.

            type: DOM element

        value: The value to set.

            type: String

        elementLabel: The label of the element to be shown in the logs.

            type: String

"javaScriptSnippet": "js::yield interactions.setForComboBox(element, arguments[1]);"
"javaScriptSnippet": "js::yield interactions.setForComboBox(element, arguments[1], 'combobox');"
**arguments[1] is the value entered in the text box in the TB.**

13. SetLightningListDualBox = function(element, value)

  • Description: Sets the value of the lightning list dual box.
  • Parameters:

        element: The element to set the value for.

            type: DOM element

        value: The value to set.

            type: String

 "javaScriptSnippet": "js::yield interactions.setLightningListDualBox(element, arguments[1]);"
**arguments[1] is the value entered in the text box in the TB.**

14. SelectOption = function(element, value)

  • Description: Selects the option from the dropdown.
  • Parameters:

        element: The element to select the option from.

            type: DOM element

        value: The value to select.

            type: String

"javaScriptSnippet": "js::yield interactions.selectOption(element, arguments[1]);"
**arguments[1] is the value entered in the text box in the TB.**

15. Expand = function(element)

  • Description: Expands the element.
  • Parameters:

        element: The element to expand.

            type: DOM element

"javaScriptSnippet": "js::yield interactions.expand(element);"

16. Collapse = function(element)

  • Description: Collapses the element.
  • Parameters:

        element: The element to collapse.

            type: DOM element

"javaScriptSnippet": "js::yield interactions.collapse(element);"

17. SelectTab = function(element)

  • Description: Selects the tab.
  • Parameters:

        element: The element to select the tab.

            type: DOM element

"javaScriptSnippet": "js::yield interactions.selectTab(element);"

18. SetForDate = function(element, value)

  • Description: Sets the value of the date field.
  • Parameters:

        element: The element to set the value for.

            type: DOM element

        value: The value to set.

            type: String

"javaScriptSnippet": "js::yield interactions.setForDate(element, arguments[1]);"
**arguments[1] is the value entered in the text box in the TB.**

19. SetForTime = function(element, value)

  • Description: Sets the value of the time field.
  • Parameters:

        element: The element to set the value for.

            type: DOM element

        value: The value to set.

            type: String

"javaScriptSnippet": "js::yield interactions.setForTime(element, arguments[1]);"
**arguments[1] is the value entered in the text box in the TB.**

20. lightningUploadFiles = function(element, value)

  • Description: Uploads the files for lightning element.
  • Parameters:

        element: The element to upload the files.

            type: DOM element

        value: The value to set.

            type: String

 "javaScriptSnippet": "js::yield interactions.lightningUploadFiles(element, arguments[1]);"
**arguments[1] is the value entered in the text box in the TB.**

21. htmlUploadFiles = function(element, value)

  • Description: Uploads the files for HTML element.
  • Parameters:

        element: The element to upload the files.

            type: DOM element

        value: The value to set.

            type: String

"javaScriptSnippet": "js::yield interactions.htmlUploadFiles(element, arguments[1]);"
**arguments[1] is the value entered in the text box in the TB.**
Review Provar on G2
Documentation library

Trying to raise a case with our support team?

We use cookies to better understand how our website is used so we can tailor content for you. For more information about the different cookies we use please take a look at our Privacy Policy.

Scroll to Top