Data-driven dropdown menu Katalon Automation Recorder

1.2k views Asked by At

I'm trying to automate click with Selenium IDE. I was trying to figure out if I can use the "Select" command, but it didn't work.

I would like to click on the value on the dropdown that I put in my CSV file. Like I want a specific value of the dropdown for each line of my CS.

Here's the code.

enter image description here

enter image description here

1

There are 1 answers

0
Navarasu On

Katalon [WebUI] Select is meant only to select default html select component. Yours is custom select box.

You need to select that exactly same way as you do manually like

  • Click the menu
  • Wait for dropdown to be visible
  • Select the particular value based on name from your csv

Based on your html, your Katalon script will be like this,

TestObject menu = new TestObject('Menu').addProperty('css', ConditionType.EQUALS, "div.md-select-menu-container")
WebUI.click(menu)

TestObject dropdownValue = new TestObject('DropDownValue').addProperty('xpath', ConditionType.EQUALS, "//md-option[contains(text(), 'AVAN - Advancè')]")
WebUI.waitForElementVisible(dropdownValue, 30)
WebUI.click(dropdownValue)