Not able to select a drop down item

I want to select a currency among but based on the external data file (excel file).
the program clicks on the list, but does not select the index i expected in

list of currencies :

Data :


Error :

Html :

i added more informations to the issue.

thank you.

I do not understand what Currency in the above screenshot is.

What value do you expect Currency to have? 1,2,3,…? or EUR,USD,CHF?

I expected to select the currency i have in my excel file (XAF).

Currency is a variable i created and linked it in my test case.

I understand you expect the variable Currency to have a String value XAF.

Then why you use WebUI.selectOptionByIndex keyword? You should read the doc carefully.

The 2nd argument for WebUI.selectOptionByIndex is expected to be index value such as 2 or 2,3. Passing XAF to this keyword does not make sense at all.

According to Java Naming Convention, a variable name should be

in mixed case with a lowercase first letter.

Therefore you should name it currency, rather than Currency.

even with lowercase first letter, not working.

Why do you use WebUI.selectOptionByIndex keyword with 2nd argument XAF? It doesn’t make sense.

the classic method with index and value works very very well.

but now i use the excel file, and I planned currency with the value XAF
and I would like the program to select this currency in the scenario.

Data test :

I do not understand what you are asking to us.

If you make a search Katalon Data Driven, you will find plenty of articles that shows how to make a tests backed with Excel file. Have you tried any tutorial?

I used any test case with the data from the excel file and it worked fine.
just as the test gets to select the currency, the program clicks on the currency field
but cannot choose the currency that I provided in the data file.

just this step not working now.

Let me ask you again,

for example :
if i want to select USD i use this script and it works correctly.

but if i want to select XAF currency, i just wana replace ‘2’ in my script by ‘36’ and XAF will be selcted.

code :

html :

So, what are you asking to us?

my program can clicks on the currency field, but enable choose currency (what i planned in my data file).

is it clear now ?

Sorry, I can’t understand.

my program clicks on this list, but can not select one currency among when i used the excel file data.


so i have to select one currency in this dropdown list.

As long as your code calls WebUI.selectOptionByIndex keyword with XFA as the 2nd argument value, I believe that your code will never be successful.

Why not you use WebUI.selectOptionByValue keyword instead?