# Mobile.scrolltotext sometimes work and not work

**URL:** <https://forum.katalon.com/t/mobile-scrolltotext-sometimes-work-and-not-work/23029>\
**Category:** Bug Report\
**Tags:** katalon-studio, bugs-report\
**Created:** [April 11, 2019, 7:21pm UTC](https://forum.katalon.com/t/mobile-scrolltotext-sometimes-work-and-not-work/23029 "2019-04-11T19:21:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![GeneralChingChicken](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/generalchingchicken/32/1398_2.png) [@GeneralChingChicken](https://forum.katalon.com/u/GeneralChingChicken)\
**Post date:** [April 11, 2019, 7:21pm UTC](https://forum.katalon.com/t/mobile-scrolltotext-sometimes-work-and-not-work/23029/1 "2019-04-11T19:21:44Z")

</div>

mobile.scrolltoText will work and sometimes not work.  
Whenever I run my test I see it on the log viewer when it runs…but when I try running again…it will not run and skip it. which will fail the test. When I look at the log I don’t see anything in the log.

---

<div class="post-metadata">

**Author:** ![757255712](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/757255712/32/4115_2.png) [@757255712](https://forum.katalon.com/u/757255712)\
**Post date:** [April 22, 2019, 3:42am UTC](https://forum.katalon.com/t/mobile-scrolltotext-sometimes-work-and-not-work/23029/2 "2019-04-22T03:42:26Z")

</div>

I am also facing the same problem.

Mobile.scrollToText most of the time does not work…The screen does not scroll at all but the log marks it passed.

Katalon version: 6.1.2  
OS: Mac

---

<div class="post-metadata">

**Author:** ![duyluong](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/duyluong/32/1116_2.png) [@duyluong](https://forum.katalon.com/u/duyluong)\
**Post date:** [April 22, 2019, 3:48am UTC](https://forum.katalon.com/t/mobile-scrolltotext-sometimes-work-and-not-work/23029/3 "2019-04-22T03:48:41Z")

</div>

Hi @GeneralChingChicken, @757255712

Please provide more information: OS, Platform, execution logs, screenshot…

Please read this guide:

> [@\[TIP\] How To Help Us Help You!](http://forum.katalon.com/t/tip-my-test-is-broken-nothing-works-please-help-me/12919):
>
> My test is BROKEN! NOTHING WORKS! HELP ME! Relax. We get it. We really do. There are some pretty smart and clever people on this forum, but you must realize, they are not magicians or wizards or gods. They cannot see your code, they can’t see your errors and they don’t even know what your AUT is meant to do even though it might seem perfectly obvious to you. So please relax and follow the advice below, before you start writing your post. The advice below will tell you the exact information …

---

<div class="post-metadata">

**Author:** ![757255712](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/757255712/32/4115_2.png) [@757255712](https://forum.katalon.com/u/757255712)\
**Post date:** [April 22, 2019, 6:17am UTC](https://forum.katalon.com/t/mobile-scrolltotext-sometimes-work-and-not-work/23029/4 "2019-04-22T06:17:59Z")

</div>

Hi, @duyluong , thanks for the concern.

In my case, I have a long **side navigation overlay** , so the scenario is that after I click on a button to show the side nav, I want to **scroll down** to find a text view and click on it.

Also, Mobile.scrollToText atually works on regular pages but fails to do its things on a long side nav overlay. Even though screen not scroll, log always says passed.

---

<div class="post-metadata">

**Author:** ![duyluong](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/duyluong/32/1116_2.png) [@duyluong](https://forum.katalon.com/u/duyluong)\
**Post date:** [April 22, 2019, 6:38am UTC](https://forum.katalon.com/t/mobile-scrolltotext-sometimes-work-and-not-work/23029/5 "2019-04-22T06:38:50Z")

</div>

Hi @757255712,

Could you show your script and the execution logs in Log Viewer and Console?

---

<div class="post-metadata">

**Author:** ![757255712](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/757255712/32/4115_2.png) [@757255712](https://forum.katalon.com/u/757255712)\
**Post date:** [April 22, 2019, 9:13am UTC](https://forum.katalon.com/t/mobile-scrolltotext-sometimes-work-and-not-work/23029/6 "2019-04-22T09:13:23Z")

</div>

@duyluong

After reviewing the scrollToText doc

### Description

Scroll to an element which contains the given text.

I actually found the reason that caused the issue 😅 It is because that I was trying to scroll to the **exact text** ‘account’, but in the current page, it **already had** a text(user account) that **contained** ‘account’🤨, so it appeared to not scroll at all, but for the scrollToText function, it actually did its job, so katalon marked it as passed…😓

So now the question is: how do I scroll to an exact text?🤔

---

<div class="post-metadata">

**Author:** ![mbusse](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@mbusse](https://forum.katalon.com/u/mbusse)\
**Post date:** [May 15, 2019, 7:31am UTC](https://forum.katalon.com/t/mobile-scrolltotext-sometimes-work-and-not-work/23029/7 "2019-05-15T07:31:40Z")

</div>

For anyone else having the same problem. When working on a website with automatic scrolling I had to add a delay to wait for the Javascrip scrolling to finish before using the ScrollToElement-Keyword also the smae problem goes for clicking on an element by the way.

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/katalon/original/3X/d/5/d55596ab02785a255798e87ede769734747b30c4.svg) [@system](https://forum.katalon.com/u/system)\
**Post date:** [May 14, 2020, 7:31am UTC](https://forum.katalon.com/t/mobile-scrolltotext-sometimes-work-and-not-work/23029/8 "2020-05-14T07:31:45Z")

</div>

Closed on May 14, 2020, 7:31am UTC

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
