Dropdown issue when running from jenkins

Hi,

I am trying to set dropdown value and this works fine when we run from katalon fine, but running same script from jenkins scripts fail with error “org.openqa.selenium.ElementNotInteractableException: element not interactable: Element is not currently visible and may not be manipulated”
I tried below options as well to set dropdown value , this all works fine from local but then from running from jenkins still same error.

SelectByVisibletext
SelectbyValue
SelectByIndex
Using click.

Error Log
org.openqa.selenium.ElementNotInteractableException: element not interactable: Element is not currently visible and may not be manipulated
(Session info: chrome=102.0.5005.63)
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘NY-VM-26’, ip: ‘172.20.55.175’, os.name: ‘Windows Server 2012 R2’, os.arch: ‘amd64’, os.version: ‘6.3’, java.version: ‘1.8.0_181’
Driver info: com.kms.katalon.selenium.driver.CChromeDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 102.0.5005.63, chrome: {chromedriverVersion: 102.0.5005.61 (0e59bcc00cc4…, userDataDir: C:\Users\NYUSER\AppData\Loc…}, goog:chromeOptions: {debuggerAddress: localhost:60159}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
Session ID: b9162c6669f4733b7d80cebd77b3a8a1
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at com.kms.katalon.selenium.driver.CChromeDriver.execute(CChromeDriver.java:19)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:84)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.lambda$new$0(EventFiringWebDriver.java:404)
at com.sun.proxy.$Proxy12.click(Unknown Source)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.click(EventFiringWebDriver.java:417)
at org.openqa.selenium.support.ui.Select.setSelected(Select.java:311)
at org.openqa.selenium.support.ui.Select.setSelectedByIndex(Select.java:293)
at org.openqa.selenium.support.ui.Select.selectByIndex(Select.java:172)
at org.openqa.selenium.support.ui.ISelect$selectByIndex.call(Unknown Source)

Before trying to set this element, have you just “moved” to a new page? If yes, then you should put in a wait statement to allow the page to finish “appearing” before you try to interact with it. How about trying the below (one of them or all)?

WebUI.waitForPageLoad(10)
WebUI.waitForElementVisible(yourTestObject, 10)
WebUI.waitForElementClickable(yourTestObject, 10)

1 Like

Yes this element is within dialog window (In page on click of button dialog window pops up) but I am able to set all other fields values which are there in same window except this drop down.

I have given even wait before setting this element value, also tried validating element
by isDisplayed() and isEnabled() call, both returning true value from Jenkins log.

Have you tried to use selenium on it as well?

import org.openqa.selenium.By as By
import org.openqa.selenium.support.ui.Select as Select
import org.openqa.selenium.WebDriver as WebDriver
import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory

Select select = new Select(DriverFactory.getWebDriver().findElement(By.xpath("your elements pathway")))
String optionText = select.getFirstSelectedOption().getText()
1 Like

I tried this one, this even works fine from local but again while setting field from jenkins getting same error “element not interactable: Element is not currently visible and may not be manipulated”