Parallel or Floating Step Execution

I have the following scenario, the page that I’m browsing from time to time has a loading window that displays updating and then processing request, I manage to identify them, and they are elements which are always present but not always visible, they appear randomly while my test case is running, is there a way to let the wait for element visible standing by for the loading screen to come up and then continue execution? the problem is that while this screen appears the test case kept clicking in the background and the page did not respond.

hello Kenneth
is

WebUI.waitForElementVisible(testObject, TIME_TO_WAIT, FailureHandling.OPTIONAL)

working for you?

Andrej Podhajský said:

hello Kenneth
is

WebUI.waitForElementVisible(testObject, TIME_TO_WAIT, FailureHandling.OPTIONAL)

working for you?

  

This works whenever the screen appears, I have been using it, but is there a way to run other steps in parallel with the waiting action and stop the execution while I handle the screen?