# How to perform mobile actions on an app within a separate thread

**URL:** <https://forum.katalon.com/t/how-to-perform-mobile-actions-on-an-app-within-a-separate-thread/52190>\
**Category:** Mobile Testing\
**Tags:** mobile-testing, katalon-studio\
**Created:** [February 17, 2021, 2:48am UTC](https://forum.katalon.com/t/how-to-perform-mobile-actions-on-an-app-within-a-separate-thread/52190 "2021-02-17T02:48:34Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [February 18, 2021, 9:22am UTC](https://forum.katalon.com/t/how-to-perform-mobile-actions-on-an-app-within-a-separate-thread/52190/7 "2021-02-18T09:22:50Z")

</div>

> [@evan.kralicky](#):
>
> E.g. Waiting for an element to show using `Mobile.waitForElementPresent` in the background of a test case while that test case continues on as normal.

It seems you want `Mobile.asyncWaitForElementPresent` which works asynchronously. You want to register a Groovy Closure as a callback, and timeout. As you know, all of KS built-in keywords are synchronous. There is no **async** type of keyword. That is something completely new. I have no idea if its feasible in KS or not.

> [@evan.kralicky](#):
>
> I basically need to check if an unexpected element appears while I am running a normal test case.

I suppose that [Image comparison](http://forum.katalon.com/t/visual-testing-image-comparison-with-katalon-studio-7-8-0-and-katalon-testops/45557) is an alternative approach to check if anything UNEXPECTED happened. You want to take screenshots twice: before “normal test case” and after “normal test case”. And then create “diff” between the 2 images, with which you would find unexpected things if any.

---

_[View the full topic](https://forum.katalon.com/t/how-to-perform-mobile-actions-on-an-app-within-a-separate-thread/52190)._
