Not able to select a drop down item

Even when i used EUR, UDS, as currency it never successfull.

how can i solve this if i want to select one currency using excel file data.

I already use Select option by Index and by Value, scenario is ok.

but if i want to use the same scenario using an excel file data.

tha’s my right issue

I don’t understand your problem. Sorry, I will quit.

I tried to be clear on what I want but …

no problem so thank you.

Hope this can help you…

@ferrariklersone I think the data that you are getting from your Excel file is not something that can be “turned” into a Range, which is what the second parameter is supposed to be. As your test script above shows, the selectOptionByIndex works when you have the range as ‘4’.

So, you when you changed your TC to pull the data from Excel, you should change the use of Index to Value (or even Label since it seems to be the same as Value).

However, if you have to stay with selectOptionByIndex, then you need to create an intermediate Map variable (or List) that “converts” XAL to 36.

and maybe something like the below to collect your options:

List<WebElement> optionsList = driver.findElement(By.xpath('//select[@name="j_idt589"]')).findElements(By.tagName("option"));

and then maybe a for loop that uses the loop counter mapped with each WebElement.

def currencyList = [:]

for (icnt = 0; icnt < optionsList.size(); icnt++) {

     currencyList[optionsList[icnt]] = icnt.toString();

thank you, i will try this method.