Error in WebUI.selectOptionByValue from data file

Hi everyone, I’m new using Katalon Studio. I am trying to use the SelectOptionByValue method but the data is in an excel, this is what I am writing but the test fails

WebUI.selectOptionByValue(findTestObject(‘3_BuscarPadron/4_select_Accion’), findTestData(‘Data Files/Proacciones’).getValue(2, 16), false)

Thank you very much in advanced

Details please!

1 Like

When you use “selectOptionByValue”, it means you have looked at the HTML and seen what the value attribute contains.
If you just looked at the page and seen what the drop-down display is showing, then you need to use “selectOptionByLabel”.

And using either of the two “selectOptionBy” statements assumes you are working on a select tag and not a div.


Thank you very much for your answer. Anyway my problem was with the name of data file, the name was: datafile.xls.xls which is incorrect. So i modified the name: data.xls and everything works.

1 Like