This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
4 / 4
Jun 2018

Hi,

I tried to getText() of an element in a specific screen in my app (with a GL rendering), and it takes 10 seconds to get the element’s text .
and when the GL rendering is paused it takes 20ms to get the element’s text.

Do you have any explanation for this ?
Is there something I can do ? (I really need to get the element’s text much quicker)

Thanks !!!

Code
t =self.driver.find_element_by_id(“com.App:id/debugTextView”).text

appium server logs

[HTTP] --> GET /wd/hub/session/7cade58b-3bac-4096-a4be-8fdb94a317ab/element/27/text
[HTTP] {}
[W3C] Calling AppiumDriver.getText() with args: [“27”,“7cade58b-3bac-4096-a4be-8fdb94a317ab”]
[AndroidBootstrap] Sending command to android: {“cmd”:“action”,“action”:“element:getText”,“params”:{“elementId”:“27”}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“action”,“action”:“element:getText”,“params”:{“elementId”:“27”}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: getText
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:0,“value”:“T2T Time: 136ms”}
[AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Responding to client with driver.getText() result: “T2T Time: 136ms”
[HTTP] <-- GET /wd/hub/session/7cade58b-3bac-4096-a4be-8fdb94a317ab/element/27/text 200 10104 ms - 89

  • created

    Jun '18
  • last reply

    Jun '18
  • 3

    replies

  • 236

    views

  • 3

    users

  • 1

    link

@Amit_Mia it’s only taking 136 ms

[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:0,“value”:“T2T Time: 136ms”}
[AndroidBootstrap] Received command result from bootstrap

You have setup longer implicit wait or using both implicit & explicit waits together. Which gives weired results.

You need to follow same good practices from web automation to mobile as well, don’t mix implicit and explicit waits, keep implicit wait to minimal and use custom explicit wait for individual elements.

Hope it helps.

Regards,
Vikram

No it takes 10104 ms (10 sec)

  • GET /wd/hub/session/7cade58b-3bac-4096-a4be-8fdb94a317ab/element/27/text 200 10104 ms

there are no waits in my code

136 ms is the text I am getting from the element ( T2T Time: 136ms )

Refer this and add this capability in your script.
caps.setCapability(MobileCapabilityType.AUTOMATION_NAME, “uiAutomator2”);