Custom Keywords no longer working after Katalon 7 Update

You captured the image during “human time”. To the webdriver, working in “computer time”, it’s NOT visible.

Try waiting for it to be visible.

That is correct because the “Joe.pcrtrunk” is a value under the Dropdown menu I have highlighted in Red. further more, that is the problem right there, I run a Custom Keyword to Show Hidden Selects and Hide Currently displyed Divs, the image shows that the Divs never changed to the select dropdown boxes. Again this issue is NOT present when I run the same test in 6.3.3, Its almost like every so often KS7 says it runs the Custom keyword and gives it a “PASSED” message, but the Custom Keyword is NOT running as the Dropdown menus look completely different than what is displayed. In the previous comment on this thread I shared the Custom Keyword I run. This keyword Is failing ONLY when in KS7 that is why I believe this to be a KS7 issue rather than Code or script related.

Now I do not know the back end of Katalon, But I do know that if something works seemlessly in one version vs another, then one of two things is happening,

A.) There was a bug in 6.3.3 that was allowing my script to work when it never should have and you have since fixed this issue.

-or-

B.) something in KS7 is causing custom keywords NOT to always execute by Katalon is marking them as being ran.

What is more concerning to me is that the error I provided previously shows an error through about Chromedriver not compatible, but Both my Chrome browser and Chrome driver on Katalon are up to date.

2019-10-31 14:17:03.893 INFO c.k.katalon.core.main.TestCaseExecutor - --------------------
2019-10-31 14:17:03.897 INFO c.k.katalon.core.main.TestCaseExecutor - START Test Cases/Rollups/Name Results screen
2019-10-31 14:17:05.049 DEBUG testcase.Name Results screen - 1: callTestCase(findTestCase(“Common/Login”), [:], STOP_ON_FAILURE)
2019-10-31 14:17:05.219 INFO c.k.katalon.core.main.TestCaseExecutor - --------------------
2019-10-31 14:17:05.219 INFO c.k.katalon.core.main.TestCaseExecutor - CALL Test Cases/Common/Login
2019-10-31 14:17:05.888 DEBUG testcase.Login - 1: openBrowser("")
2019-10-31 14:17:06.422 INFO c.k.k.core.webui.driver.DriverFactory - Starting ‘Chrome’ driver
Oct 31, 2019 2:17:06 PM org.openqa.selenium.remote.DesiredCapabilities chrome
INFO: Using new ChromeOptions() is preferred to DesiredCapabilities.chrome()
2019-10-31 14:17:06.487 INFO c.k.k.core.webui.driver.DriverFactory - Action delay is set to 0 seconds
Starting ChromeDriver 77.0.3865.40 (f484704e052e0b556f8030b65b953dce96503217-refs/branch-heads/3865@{#442}) on port 17765
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
[1572545828.977][WARNING]: This version of ChromeDriver has not been tested with Chrome version 78.
[1572545830.983][WARNING]: Timed out connecting to Chrome, retrying…
Oct 31, 2019 2:17:13 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C

Yeah, I noticed that Chrome complaint. I’ve no idea what that is (also, I don’t test with Chrome). You could try renaming it and asking Katalon to update it

Menu | Tools > Update Webdrivers

That’s not a cool testing philosophy - you’re modifying the AUT for the purpose of testing. However, I do understand if you were to insist there’s no other way. (For background on this: Tip: DO NOT CHANGE THE AUT THROUGH TEST CODE)

Hi Yo!, That isn’t a bad Idea, I will try that. As for the dropdowns, We have Static elements which are tied to visual divs, The divs are like a mask that can be changed whenever, So we want to use the Static elements that are hidden selects. The only reason we are doing this is because I have not found a way to have Katalon select options for these selects if their Display is set to “Hidden” or “None”, The only way I have found Katalon to be able to interact with the hidden selects is by making them Visible.

If there is a way to have Katalon select a value under a hidden element, then By all means provide it, but sadly this is just how our site works. =/

Also I only test in Chrome because we do not support other browsers outside of Chrome.

Sorry, but to me, you’re leaving the realms of automation and entering the realm of reverse-engineering. This really is not automation testing.

Makes me wonder, what “user story” are you meant to be testing? Sounds to me like a regular human can’t use your website in the way you are testing it. :confused:

Did you…

Hi Russ,
No we are not reverse engineering, we are simply trying to limit the amount of modifications a Katalon Test case will need later down the road by tying my test items to objects that will never change. For an example look at image I am attaching. Both the select and the Div are the same dropdown menu in the sense that they both have the same values, the only difference being is that the Div will change over time as our website layout changes, but the static Object “The select” will never change thus if the Div’s style is changed, Katalon test will not break.

Okay, for the moment, let’s forget everything that’s gone before and start again.

I am assuming you want to target the SELECT element (not the div). The following JavaScript will reveal the select element:

js = 'document.querySelector("#category").style.display = "inline-block";'
WebUI.executeJavaScript(js, null)

No ifs or buts, frames permitting, that code will work. Obviously, the element needs to be present in the dom before you issue that command.

I saw evidence in one of your logs that you have code that does something similar? Either way, review mine, compare and act accordingly.

After that JS, then you should be able to interact with the select using regular WebUI API calls.

for me looks like this topic is subject for unit testing, not for UI.
there is no point to automate tests for something in human world if is not present nor visible … unless cryptomining or other hidden ‘goodies’
just saying

1 Like

i closed this as is not active