I am doing mobile testing on katalon studio using appium. I am having an object like this android.widget.TextView - Dont have any account Register. In this object only the Register text is clickable.
When I am running my test with this object so katalon studio is unable to identified the clickable text Register and i am unable to navigate to the register screen on my mobile through katalon studio.
1 Like
posting atleast html/screenshot/error logs will help in debugging this issue
1 Like
My react native code is:
Login.js:
{t(“Dont_Have_Account”)} <Text style={Logins.registerTextStyle} onPress={() => OnRegisterPress()}> {t(“Register_Text”)}
Dont_have_Account and Register_Text are the variables defined in en.json.
en.json:
“Dont_Have_Account”: “Don’t have any account?”,
“Register_Text”: “Register”
Katalon studio Mobile Recorder output:
When I am tapping on the Register object while making the test case so it is not getting navigated to the register screen.
Katalon studio Test case:
In the Object repository provided in the above image it is clearly seen that the object is captured and restored in the object repository.
When running the test case:
On running the test case i have generated though the test cases gets passed, but on my real device i am unable to navigate to the register screen. Even i have added delay after the tap operation to see the navigation from login to register screen but still no navigation is done.
Thanks in advance,
2 Likes
In your UI screenshot, it seems you have the tap timeOut set at zero (0). How about setting it so that your machine can actually do something, like 3 or 5? This means that your statement will try to tap, but if the statement takes more than 3 or 5 seconds, it will time out. As you have it, your statement will time out immediately, and not do anything.
I personally set my time out at 10, but the statement usually runs in 0.17 seconds–which is more than 0 so you see your issue. Mine works and yours has no chance to.
Parameters​
Param |
Param Type |
Mandatory |
Description |
to |
TestObject |
Required |
Represent a mobile element. |
timeout |
int |
Required |
Maximum period of time (in seconds) that system will wait to return result. |
[Mobile] Tap | Katalon Docs
1 Like
@grylion54 I am unable to understand what your are saying. Can you please clearly explain me what i have to do in my case?
1 Like
The “timeOut” is the second parameter in the tap statement. You have it set at zero. Your statements are timing out immediately. They have no time to do anything. Even if the tap statement only takes 0.17 seconds, because it is MORE than zero, they fail.
So, instead of:
Mobile.tap(findTestObject("android.widget.TextView - Skip (20)"), 0)
Mobile.tap(findTestObject("android.widget.TextView - Don't have any account Register"), 0)
perhaps make it like:
Mobile.tap(findTestObject("android.widget.TextView - Skip (20)"), 5)
Mobile.tap(findTestObject("android.widget.TextView - Don't have any account Register"), 5)

example:
[Mobile] Check Element | Katalon Docs
1 Like
@grylion54 I think that the problem of navigation is occurring when i am doing Mobile Recorder for creating the test case. At the time of mobile recording on clicking Don’t have any account? Register, i am unable to navigate to the register page, so i believe that this problem is not occurring when running the test case, it is occurring at the time of test creation.
I have set the timeout value to 5 seconds but still when running the test case i am unable to navigate to the register page on tapping the Don’t have any account? Register.
Register text is only clickable as mentioned in my source code of react native. Don’t have any account is not clickable.
One more thing i wanted to ask that why have you set the path value to false when starting the start application? Any specific reason for this.
I will be thankful if any one can resolve my this problem.
1 Like
Perhaps you should use the below statement to ensure you have the element on-page.
Mobile.waitForElementPresent(findTestObject("android.widget.TextView - Don't have any account Register", 10)
Mobile.tap(findTestObject("android.widget.TextView - Don't have any account Register"), 5)
It seems you are in a “hurry” to do everything, but you need to add “slowing” techniques to ensure the elements are ready for you. Especially if you are using the Recorder, you need to add the “slowing” statements.
1 Like
'HI @ayesha15akhtar3a
you are saying you created your script using mobile recorder and while executing it is not taping on the register text.
- open the same in the Mobile spy
- select the same line checkbox in the mobile spy
- click the saved object on the left side and there u can see a button at the bottom highlight.
- make sure it is highlighting the same line of code as this text register.
- if not change the XPath or attributes needed to highlight the same line of code
- once done save the object and use it to tap the Register button
2 Likes
@dineshh @bharathi.a . I think i am not clear you to all. The problem that i am facing is that when i am recording my script for the generationof test cases, at that time on clicking the “Register”, i not being able to navigate to the register page but my tap action is getting being recorded. You can see this in my test case script as well that there is a tap action performed on the “Don’t have any account? Register” but no navigation to the register page is happening. I can’t understand that if the tap action is happening so why navigation to the register page not happening. This is only happening in the katalon studio. In manuall testing when i am clicking on “Register” so i am getting navigated to the register page.
I hope now my problem is clear to you all.
If you can find any solution so please do let me know.
Thanks in advance.
1 Like
I did what you said. But still on my real mobile device after tapping on the “Don’t have any account? Register”. I am unable to navigate to the register page.
1 Like
Recording in Katalon studio itself is not enough to create test scripts and it won’t work for all mobile and web applications. you have to use mobile spy to capture the objects and replace the recorded steps where the recorded actions are not working…
2 Likes
So you mean to say that instead of using recording option for the generation of test scripts, i should use the mobile object spy option for capturing the objects and generating test scripts.
Will try this option as well. Hope so that this suggestion resolves my problem.
Thanks
2 Likes
I did as you said. I captured the objects using Mobile Spy instead of Mobile Recorder and manually generated the test case script but still my problem is not resolved. 
1 Like
I am manually clicking on the register text and navigating to the register page. Then on register page i am adding the details through katalon studio.
2 Likes