Need suggestion on the webUI commands to make a selection in the salesforce combobox
The application for automation is salesforce sales cloud and I am trying to make a selection in the combox box but the webelement is not identified.
for Click command , the object is identified
I tried using this below statement but does work
WebUI.verifyElementPresent(findTestObject('Page_All Open Leads Leads Salesforce/a_New'), 0)
WebUI.click(findTestObject('Page_Recently Viewed Leads Salesforce/a_New'))
WebUI.delay(2)
WebUI.selectOptionByValue(findTestObject('Page_New Lead Salesforce/span_Mr'), 'Mr.', false)
1 Like
Hi there @ssustautomation, 
Welcome to our forum!
I found the topic below which contain several KShare articles related to Salesforce testing with Katalon Studio which I think may be of interest to you:
http://forum.katalon.com/t/kshare-salesforce-testing-with-katalon-a-series/116155?u=albert.vu
Thanks,
Albert
1 Like
If the drop-down is not done via a <select> tag, then you cannot use any of the selectOptionByXXX statements. Here is how you can check if you have a <select> tag.
[How To] Use The Browser Developer Tools (F12 DevTools) - Product Forums / Katalon Studio - Katalon Community
Edit1: Do you know if you have dynamics <id> or are they static? If you have dynamic <id>, are you using parts of them or not?
I notice that you are using “selectOptionByValue()”. If you did have a <select> tag, have you looked at the value attribute of the HTML that you may have or are you looking at the text that is in the drop-down. If you are looking at the text in the drop-down, then you have to use:
“selectOptionByLabel()”
And, I notice that you have your object with a tag of, “span”, so I am guessing that you don’t have a <select> tag.
Edit1: And can I suggest instead of “WebUI.delay(2)” that you try:
WebUI.waitForElementVisible(findTestObject('Page_New Lead Salesforce/span_Mr'), 10)
WebUI.selectOptionByValue(findTestObject('Page_New Lead Salesforce/span_Mr'), 'Mr.', false)
WebUI.verifyOptionSelectedByValue(findTestObject('Page_New Lead Salesforce/span_Mr'), 'Mr.', false, 10)
1 Like