Unable to select option by value '7' of object

I was unable to execute the selectoptionbyvalue command while running my test case from the test suite. Please locate the following mistake. and in Excel, I entered a value, but the execution still fails… Thanks

=============== ROOT CAUSE =====================
Caused by: com.kms.katalon.core.exception.StepFailedException: No option matched.

For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html

10-20-2022 01:24:38 PM selectOptionByValue(findTestObject(“Object Repository/Reception officer/Page_PIMS - Botswana Prison System/select_Select Religion. African Traditional_4d1182”), Select_Religion, true)

Elapsed time: 0.940s

Unable to select option by value ‘7’ of object ‘Object Repository/Reception officer/Page_PIMS - Botswana Prison System/select_Select Religion. African Traditional_4d1182’ using regular expression (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to select option by value ‘7’ of object ‘Object Repository/Reception officer/Page_PIMS - Botswana Prison System/select_Select Religion. African Traditional_4d1182’ using regular expression
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
at com.kms.katalon.core.webui.keyword.builtin.SelectOptionByValueKeyword.selectOptionByValue(SelectOptionByValueKeyword.groovy:99)
at com.kms.katalon.core.webui.keyword.builtin.SelectOptionByValueKeyword.execute(SelectOptionByValueKeyword.groovy:71)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.selectOptionByValue(WebUiBuiltInKeywords.groovy:1168)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$selectOptionByValue$6.call(Unknown Source)
at Logon as Reception Officer_Officer.run(Logon as Reception Officer_Officer:58)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:448)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)
at com.kms.katalon.core.common.CommonExecutor.accessTestCaseMainPhase(CommonExecutor.java:65)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:144)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:106)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:185)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1666265031721.run(TempTestSuite1666265031721.groovy:36)
Caused by: com.kms.katalon.core.exception.StepFailedException: No option matched.
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:50)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:23)
at com.kms.katalon.core.webui.keyword.builtin.SelectOptionByValueKeyword$_selectOptionByValue_closure1.doCall(SelectOptionByValueKeyword.groovy:92)
at com.kms.katalon.core.webui.keyword.builtin.SelectOptionByValueKeyword$_selectOptionByValue_closure1.call(SelectOptionByValueKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
at com.kms.katalon.core.webui.keyword.builtin.SelectOptionByValueKeyword.selectOptionByValue(SelectOptionByValueKeyword.groovy:99)
at com.kms.katalon.core.webui.keyword.builtin.SelectOptionByValueKeyword.execute(SelectOptionByValueKeyword.groovy:71)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.selectOptionByValue(WebUiBuiltInKeywords.groovy:1168)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$selectOptionByValue$6.call(Unknown Source)
at Script1666248987113.run(Script1666248987113.groovy:58)
… 13 more
)

What happens when you change the “true” to “false”?

WebUI.selectOptionByValue(findTestObject('...'), "7", false)

Also, you are using “byValue”. That means you have looked at the HTML and seen the value attribute is 7? If the dropdown displays 7, then you want:

WebUI.selectOptionByLabel(findTestObject('...'), "7", false)