Please Help @Katalon_team @Chris_Trevarthen
It Takes Too Long to Tap and Verify Element In Mobile
Thanks
Please Help @Katalon_team @Chris_Trevarthen
It Takes Too Long to Tap and Verify Element In Mobile
Thanks
What version are you using?
Hi @freak.fahmi,
Could you try upgrading to Katalon Studio 6.3.3? I remember some older versions were not respecting the timeouts set in tests, so that could be an issue youâre seeing.
â Chris
I am Try Katalon studio 6.3.3 but still Same Too Long time Verify Element
[35m[HTTP][39m [37mâ>[39m [37mPOST[39m [37m/wd/hub/session/2593bf04-c884-43d5-93e8-3553ab4dbc8c/timeouts[39m
[35m[HTTP][39m [90m{âimplicitâ:5000}[39m
Thanks
Hi @freak.fahmi,
Could you also confirm what your setting is for the âDefault wait for element timeoutâ? You can find this in the Project->Settings->Execution menu screen. I have mine set for 5 seconds. Iâm wondering if a lower time would speed things up for you.
If that doesnât work, could you tell us if youâre seeing the same slowness on all verifyElementText calls (do you have any in other tests?) or is it this particular one?
Could you also share the logs? Iâm curious to see what Katalon/Appium are doing during that 53 seconds.
Thanks,
Chris
Hey @Chris_Trevarthen,
I donât know if is the same thing, but I created a issue that the system is delaying to set values in the fields (System delay to setText in textbox (v.6.3.4 beta))
This Project ->Setting ->Execution
Sometimes verifyElementText and Tap Calls is Slowness
This Log
LogLongTimeTapAndVerify.txt (78.2 KB)
PLease check timeout Implicit:5000
Thanks
Thanks for that info, @freak.fahmi.
It looks like your wait for timeout is set to what I would expect.
Looking at the logs, I see the verifyElementText command is looking for an object with the following attributes:
new UiSelector().className(\"android.widget.TextView\").text(\"Belanja sekarang dengan Alfagift\").resourceId(\"com.alfamart.alfagift:id/txtNotificationTitle\").instance(3)
And it does seem that it takes at least 20 seconds to find it. It doesnât seem to take that long to find other elements, so Iâm wondering if it has something to do with the the properties of this element and whatâs showing on the screen at the time. Could you try to edit the Test Object for this element and uncheck the class
property and the instance
property? Iâm wondering if the way that the Test Object is being searched may be too general at first and wasting time.
It could also be helpful if you can provide a screenshot of the app at the time youâre looking for this element.
Thanks,
Chris
Hi @freak.fahmi,
Since your Test Objects already have the text in them, verifying the text doesnât add a lot of value to your tests. You could try to change it to the verifyElementExists()
function to see if that speeds things up: https://docs.katalon.com/katalon-studio/docs/mobile-verify-element-exist.html. This might cut down on the number of steps for the check.
â Chris
Hi @freak.fahmi,
That is unfortunate. Thanks for trying all these different steps. Could you try one more thing for me? Iâd like to see what Appium thinks is on the screen at the time when youâre looking for that element. If there are a lot of things on the screen, it could be slow to find the element youâre looking for.
Here is a post that I shared with someone on how to do that capture to getPageSource()
:
Thanks,
Chris
Hi @freak.fahmi,
It doesnât look like the screen is too complex - at least nothing that stands out as causing a slow lookup.
I noticed that the object that is a textNotificationTitle
is the only one of that resource-id on the screen. Could you try unchecking the text
property on the Test Object so resource-id
is the only property active? This could tell us whether text lookup is slowing things down.
One other thing you could try is to force the tests to run through âUiAutomator2â. This could be faster than just âUiAutomatorâ. To change this setting, you can add the following to your test before you call startApplication
:
RunConfiguration.setMobileDriverPreferencesProperty("automationName", "UiAutomator2")
Note: youâll need to add import com.kms.katalon.core.configuration.RunConfiguration
to your test.
â Chris
Hi @freak.fahmi,
Could you tell me the version of Android SDK you are using, along with the device model and Android version for these tests? Iâd like to try to replicate the issue.
â Chris
[35m[Appium][39m Appium v1.12.1 creating new AndroidUiautomator2Driver (v1.33.0) session
[35m[Appium][39m Capabilities:
[35m[Appium][39m deviceId: 0123456789ABCDEF
[35m[Appium][39m platform: ANDROID
[35m[Appium][39m platformName: android
[35m[Appium][39m app: D:\Alfagift-4.0.13-20190930.apk
[35m[Appium][39m appWaitActivity: com.*
[35m[Appium][39m autoGrantPermissions: true
[35m[Appium][39m automationName: UiAutomator2
[35m[Appium][39m deviceName: WIZPHONE WP001 (Android 7.0)
[35m[Appium][39m fullReset: true
[35m[Appium][39m newCommandTimeout: 1800
[35m[Appium][39m noReset: false
[35m[Appium][39m platformVersion: 7.0
[35m[Appium][39m systemPort: 64953
[35m[Appium][39m udid: 0123456789ABCDEF
Thanks
Hi @freak.fahmi,
I tried creating an emulator with the specs you provided and Iâm not seeing the same slowness.
At this point, it does seem like a bug, but unfortunately, I donât have any more insight into how to fix it. Iâm going to have to defer to the Katalon developers and hope they can provide more troubleshooting steps or put in a bug fix.
Sorry I couldnât help more,
Chris