Not able to Select the Dropdown value by using select option by value

Hi Team,

I am very new to Katalon tool and automation testing as well.

Can you please help here to select the value in the drop down list

After identifiying the object, i am trying to call the drop down value in the script by using Selectoption by value.

getting below error.

Unable to select option by value ‘VIVA Postpaid Unlimited 15 LTE Plan’ of object ‘Object Repository/Order_Line Items/Page_Line Items/Customize Items/Click on Postpaid Plans’ (Root cause: org.openqa.selenium.support.ui.UnexpectedTagNameException: Element should have been “select” but was “a”
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’
System info: host: ‘WIN7-PC’, ip: ‘192.168.104.18’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_102’
Driver info: driver.version: unknown)

This is your answer:

UnexpectedTagNameException: Element should have been “select” but was “a”

Hello,
in case of custom drop-downs i use following:
1. click on element to show selection
2. scroll to element i want select
3. click on element i want to select
done

Can you please help me how you did this? I also want this solution. Thanks!

@shahida.zahid This error is caused when you are trying to use either selectOptionByLabel or selectOptionByValue on an element that is NOT a select. If you can review the attributes of the element you will see that the tag attribute is NOT a select. Look at the page’s code for this element and check if it is a select or perhaps a search input.

And NO, you cannot just change the tag to be select because then the TestObject will not be found if it is not actually one.

See this question as well: