Forum Discussion

ApplePen's avatar
Community Leader
7 years ago

How can I operate the object out of the current phone's screen?


I need to select  the object. Now there are two situation.

One: the object in the current screen.

The other: the object out of the current screen.

If the object is out of the current screen , how can I select it?

Please check the attachment(file e) in detail.


Looking forward for your reply.
Thank you.
---Steven Wang





1 Reply

  • AlexKaras's avatar
    Champion Level 3

    Hi Steven,


    You may check. For Web and Desktop UI elements, TestComplete scrolls the object into view when there is an attempt to click it. So just try to operate your mobile UI element and check if it is scrolled by TestComplete or OS.

    There is scrollintoview() method supported by majority of web browsers and it is very helpful if position of some web element is defined not by page layout but by some fancy script on the page. You may use it if you test web (or hybrid) application.

    One more possible approach is to set focus to the needed UI element. For a lot of elements TestComplete provides .SetFocus() method. Others may provide some internal method (e.g. like focus() ) that may be accessible to TestComplete. After the element is focused then again, it is either automatically put into view by OS or you may send keyboard input to it to either enter text or emulate click or selection (usually, this can be done via Space key).