Internet Explorer is unable to select value in dropdown list

Internet Explorer - Unable to select value in dropdown list.

Where as the same is working fine in chrome browser.

ps: Manually update the IE driver to v4.3 in below locaton:
<Katalon_Studio>\configuration\resources\drivers\iedriver_win64
otherwise even the sendkeys doesn’t work

import com.kms.katalon.core.testobject.ConditionType as ConditionType
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

WebUI.openBrowser('https://thetestingworld.com/index.php?option=com_formmaker&view=formmaker&id=2&Itemid=657')

WebUI.sendKeys(newTestObject("input[id*='wdform_2_element2']"), 'test@email')

WebUI.selectOptionByLabel(newTestObject("select[id='wdform_5_element2']"), 'Selenium', false)


// helper function that creates a new TestObject with CSS
TestObject newTestObject(String css) {
    TestObject to = new TestObject(css)
    to.addProperty('css', ConditionType.EQUALS, css)
    return to
}

ERROR DETAILS

Caused by: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: 'select[id='wdform_5_element2']' located by 'select[id='wdform_5_element2']' not found

@discover.selenium

This might work for you.
You can play around with the load/wait times.

WebUI.openBrowser('https://thetestingworld.com/index.php?option=com_formmaker&view=formmaker&id=2&Itemid=657')
//Waits up-to 30 seconds
WebUI.waitForPageLoad(30)

//1 second delay
WebUI.delay(1)
WebUI.sendKeys(newTestObject("input[id*='wdform_2_element2']"), 'test@email')

//5 second delay
WebUI.delay(5)
//You may need to change to ‘WebUI.selectOptionByIndex’
WebUI.selectOptionByLabel(newTestObject("select[id='wdform_5_element2']"), 'Selenium', false)

No Luck @Dave_Evers . Still facing the same issue.

Were you able to execute successfully in IE browser?

Thanks …!

Hi @discover.selenium,
First read this posting: [How To] Use The Browser Developer Tools (F12 DevTools)

Then read this posting, it may help you: [How To] Groovy(JavaScript(CSS)) - Using CSS Selectors In JavaScript In Groovy In Test Cases

1 Like