AngularJS Dropdown Keywords FREE

The custom keywords are used for scripting on the Dropdown element(*-select) in AngularJS application

406

The custom keywords list below are used to support for scripting the Dropdown element(*-select) in AngularJS application

How to use it:

1. Create/Open Katalon project (Katalon Studio version v6.0.5 or later)

2. Download and install the Plugins package

3. On the test case file, import "import com.katalon.plugin.keyword.angularjs.DropdownKeywords" .You can now use the plug-in.

Below are the developed custom keywords:

  1. verifyOptionSelectedByName(TestObject dropdownObject, String expectedName)
  2. verifyOptionItemsStatus(TestObject dropdownObject, String listItemNames, boolean expectedStatus=true)
  3. selectOptionByIndex(TestObject dropdownObject, Object range, boolean isSelect=true)
  4. selectOptionByName(TestObject dropdownObject, String listItemNames, boolean isSelect=true)
  5. selectSubOptionByIndex(TestObject dropdownObject, String optionGroupName, Object range, boolean isSelect=true)
  6. selectSubOptionByName(TestObject dropdownObject, String optionGroupName, String listItemNames, boolean isSelect=true)
  7. selectAllOption(TestObject dropdownObject, boolean isSelect=true)

Example of importing and scripting in a test case file:

*.. *

import com.katalon.plugin.keyword.angularjs.DropdownKeywords

'Open AngularJS page that tagname of dropdown is md-select' WebUI.openBrowser('https://material.angularjs.org/latest/demo/select') WebUI.maximizeWindow()

'Select All items: Select Header section' CustomKeywords.'com.katalon.plugin.keyword.angularjs.DropdownKeywords.selectAllOption'(findTestObject('Md-Option/cboCheckboxOptionHeader'), true)

CustomKeywords.'com.katalon.plugin.keyword.angularjs.DropdownKeywords.verifyOptionSelectedByName'(findTestObject('Md-Option/cboCheckboxOptionHeader'), "Corn, Onions, Kale, Arugula, Peas, Zucchini")

'Select Checkbox items by Index from 2 to 5: Option Groups section' CustomKeywords.'com.katalon.plugin.keyword.angularjs.DropdownKeywords.selectOptionByIndex'(findTestObject('Md-Option/cboCheckboxOptionGroup'), "2-5", true)

CustomKeywords.'com.katalon.plugin.keyword.angularjs.DropdownKeywords.verifyOptionSelectedByName'(findTestObject('Md-Option/cboCheckboxOptionGroup'), "Sausage, Ground Beef, Bacon, Mushrooms")

WebUI.closeBrowser()

You can refer to the source code repository to get more details: https://github.com/thangctran/Framework/tree/master/DropdownAngularJS

Visit Katalon Forum for Plugin related discussions.

API keys are required in Katalon Studio Commandline Execution. Generate Key
Information
Project details
Version
1.0.1
Type
Custom Keywords Plugin
Last updated
May 15, 2019 9:39 am
Publisher
Privacy and License Agreement