# Unable to select values from the salesforce combobox

**URL:** <https://forum.katalon.com/t/unable-to-select-values-from-the-salesforce-combobox/126473>\
**Category:** Web Testing\
**Tags:** web-testing, salesforce\
**Created:** [April 1, 2024, 7:13am UTC](https://forum.katalon.com/t/unable-to-select-values-from-the-salesforce-combobox/126473 "2024-04-01T07:13:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssustautomation](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ssustautomation/32/23870_2.png) [@ssustautomation](https://forum.katalon.com/u/ssustautomation)\
**Post date:** [April 1, 2024, 7:13am UTC](https://forum.katalon.com/t/unable-to-select-values-from-the-salesforce-combobox/126473/1 "2024-04-01T07:13:33Z")

</div>

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

```auto
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)

```

---

<div class="post-metadata">

**Author:** ![albert.vu](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/albert.vu/32/20595_2.png) [@albert.vu](https://forum.katalon.com/u/albert.vu)\
**Post date:** [April 1, 2024, 7:14am UTC](https://forum.katalon.com/t/unable-to-select-values-from-the-salesforce-combobox/126473/2 "2024-04-01T07:14:59Z")

</div>

Hi there @ssustautomation, 👋

Welcome to our forum!

I found the topic below which contain several [KShare](http://forum.katalon.com/c/product-insights/73) 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](http://forum.katalon.com/t/kshare-salesforce-testing-with-katalon-a-series/116155?u=albert.vu)

Thanks,  
Albert

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [April 1, 2024, 4:15pm UTC](https://forum.katalon.com/t/unable-to-select-values-from-the-salesforce-combobox/126473/3 "2024-04-01T16:15:16Z")

</div>

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](http://forum.katalon.com/t/how-to-use-the-browser-developer-tools-f12-devtools/34329)

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?

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [April 2, 2024, 7:41pm UTC](https://forum.katalon.com/t/unable-to-select-values-from-the-salesforce-combobox/126473/4 "2024-04-02T19:41:33Z")

</div>

> [@ssustautomation](#):
>
> `WebUI.selectOptionByValue(findTestObject('Page_New Lead Salesforce/span_Mr'), 'Mr.', false)`

I notice that you are using “selectOptionBy **Value** ()”. 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:  
“selectOptionBy **Label** ()”

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:

```auto
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)

```
