java.lang.NullPointerException when the test case has the command "waitForElementPresent"

Hi,

I’m trying to import a recorded test case with Katalon Automation Recorder into Katalon Studio. But I’m getting the following error:

"An error has occurred. See error log for more details.

java.lang.NullPointerException".

This is happening very often to me, especially when the test case has the command “waitForElementPresent”. Is there any solution for this problem?

Ema said:

Hi,

I’m trying to import a recorded test case with Katalon Automation Recorder into Katalon Studio. But I’m getting the following error:

"An error has occurred. See error log for more details.

java.lang.NullPointerException".

This is happening very often to me, especially when the test case has the command “waitForElementPresent”. Is there any solution for this problem?

We’ve logged this issue and will be fixed soon. Thanks for your finding :).

For a workaround solution, please use this instead:

selenium.waitFor({selenium.isElementPresent("name=password")})

Vinh Nguyen said:

For a workaround solution, please use this instead:

selenium.waitFor({selenium.isElementPresent("name=password")})

Hi,
testing the command you mentioned, the following error appears:

Test Cases/mi_project FAILED because (of) groovy.lang.MissingMethodException: No signature of method: com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium.waitFor() is applicable for argument types: (Script1516640283652$_run_closure1) values: [Script1516640283652$_run_closure1@324dcd31]

Possible solutions: wait(), wait(long), wait(long, int), with(groovy.lang.Closure)