Unable to deselect options in Edge using keywords

Katalon is unable to deselect options in elements in Microsoft Edge. The following keywords work in Chrome 71.0.3578.98, IE 11.523.17134.0, and Firefox 63.0.1. In Edge 42.17134.1.0, the options remain selected without throwing an error.

WebUI.deselectAllOption()
WebUI.deselectOptionByIndex()
WebUI.deselectOptionByValue()
WebUI.deselectOptionByLabel()

1 Like

Please post the source code of the html page. In some cases, basic selenium deselects wont work. you might have to use click to uncheck the options

Here’s the source for the select element. It’s a very standard select menu. I can’t post the full page source code for IP reasons.

<select multiple="" id="selectId" class="form-control">
    <option id="123">option1</option>
    <option id="456">option2</option>
    <option id="789">option3</option>
    <option id="012">option4</option>
</select>

Deselecting options manually requires holding the “Ctrl” key while clicking.

I was able to workaround the immediate issue by using the following to clear all selections:

WebUI.executeJavaScript(“document.getElementById("selectId").selectedIndex = -1”, null)

seems like a basic select. Anyways, you have found the solution. Great

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.