since I have updated to the new version of Katalon Studio 8.6.0, all test cases fall, because command waitForElementNotPresent is not working properly. If I run the same test case on Katalon Studio 8.5.0, test case passes successfully.
There is a problem that waitForElementNotPresent is constantly waiting even though the element is no longer displayed on the page. Like I said before - on version 8.5.0 the same test case was fine, so I suppose there is no problem in my test case.
The log says: Unable to find the element located by 'By.xpath: //div[@class='Preloader â]â. Please recheck the objects properties to make sure the desired element is located.
(console: 2023-03-20 09:20:39.898 INFO c.k.k.c.webui.common.WebUiCommonHelper - Unable to find the element located by 'By.xpath: //div[@class='Preloader â]â. Please recheck the objects properties to make sure the desired element is located. )
= but thatâs not the function of this command waitForElementNotPresent. This command should not wait if the element is not presented on my page.
Please could you verify that issue?
Thank you very much
PB
Operating System
Windows 10
Katalon Studio version
Version 8.6.0
Environment (for Web Testing)
Chrome 111.0.5563.65
The keyword waitForElementNotPresent would wait until the given element to not present (disappear) within the given time in the second unit. This mean that the object need to be appear first then this keyword would help you to wait until that element disappear. For this could you confirm that in the case this keywords is execute the object //div[@class='Preloader â] still present? You could use the waitforelementpresent to test the object first to make sure that it still present at the time to test that object.
Itâs strange, because until version Katalon Studio 8.5.0 we were used to use this command like this:
We were used to use waitForElementNotPresent in the sense that the command checks to see if the element is on the page and if so then waits for the specified amount of time. If not so, test case continues despite the fact that the element was not displayed before. We use this as a check that if there is any loader on the page, wait until it disappears. It worked like this for over a year.
Even now if i run version 8.5.0 it behaves like we used to, but after version 8.6.0 the behaviour of the this command is changed.
I have read all change log of the the new version 8.6.0 and there is no mention of a change in logic in this command.
I have read the desctiption of this command (here: [WebUI] Wait For Element Not Present | Katalon Docs) and Iâm still convinced that itâs a bug, that the command should check if the element is presented and it not so⊠test case should continue without waiting for the elemenet. There is also example: âYou want to wait until âMake Appointmentâ button is NOT present in 20 seconds.â What I understand is that the command waits until the button disappears and waits a maximum of 20 seconds (but that doesnât mean it will wait the full 20 seconds if the button disappears earlier)
EDIT:
I also verified the option that the element is first displayed on the screen and then disappears, and despite this the waitForElementNotPresent command displays a timeout.
Here is the source code of waitForElementNotPresent keyword of v8.0.5:
I do not think your sentence is right.
As far as I understand from the source code, the waitForElementNotPresent keyword of v8.0.5 is stateless. It does not remember at all if the HTML elment once was present first and then later disappeared.
@petr.brezina would have a doubt that the source has been changed at 8.6.0. The only way to answer to him is to let us see the diff of the source code of v8.6.0 and its previous version.
Should I wait until a developers from Katalon will join to this topic or should I rather report a issue through the official way via Katalon Help Center for checking the behaviour?
You, a paying user, should raise a support request. I suppose that Katalon developers are not aware of this issue. I am afraid that they havenât tested their product enough. There could be more problems to be found. You should send an alert to them.
I can easily see that v8.6.0 changed its behavior: which type of Exception to expect. v8.0.5 expects NoSuchElementException. v8.6.0 expects WebElementNotFoundExcetion. I donât know the detail how these 2 exceptions differ. I guess, @petr.brezina was trapped by this change.
@kazurayam Thank you very much for the analysis. I reported this issue to Katalon and they corfimed that there is strange behaviour of this command and they will report it to development.
I added also your diff to their ticket, but as a text, because WinRar and 7-Zip displays error during unziping the file (WaitForElementNotPreset_8.0.5_8.6.0_diff.zip)
Thanks a lot for your help.
As soon as Katalon developers write the result of their analysis, I will write the information here for others as well.
No idea how that pollingEvery() method is implemented and if it was really needed.
There is a change also in the locating logic.
I donât understand this changes:
Repeatedly applies this instance's input value to the given function until one of the following occurs:
the function returns neither null nor false
the function throws an unignored exception
the timeout expires
the current thread is interrupted
interresting, the until timeout never expire ⊠most probably a TimeoutException is never raised since the keyword only raise WebElementNotFoundException
Thanks for your input. I am also experiencing issues with the âwait for elementâ. I have replaced it for a delay, but it is not very useful. Hopefully there is an alternative or the elementâs function can be restored.
There are several keyword named âwaitForElementXXXXâ.
Which one are you talking about?
I looked at the souce of âWaitForElementPresentâ keyword of v8.4.1 and v8.6.0. There is no difference. That keyword hasnât been changed at v8.6.0. Then how about other keywords? nobody knows yet.
My tool generated the following file: 8.4.1-8.6.0.json (16.8 KB)
This file includes the following list of files. These files have some difference between the v8.4.1 and v8.6.0. Other files in the jar stayed unchanged:
I will add WebUiCommonHelper to the list since it is used under the hood at least by WaitForElementNotPresent.
Too bussy right now to look into what actually changed into others.