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 am trying to click, send and verify xcuitest element but its taking too much time(like more then 3 min) although page is already render completely

its look like my xpath is taking too much time(more than 4 to 5 min for taking any action after complete page render ) for click, send or find element on page… ID is not available on page only value, name, label and text is available on mobile page… plz suggest how to resolve this issue, although i tried online solution (on google) but unable to find any solution

I am using below xpath:-

SUBMIT BUTTON

//XCUIElementTypeButton[@ type=‘XCUIElementTypeButton’ and @name=‘SUBMIT’ and @label=‘SUBMIT’]

SEARCH TEXT BOX

//XCUIElementTypeTextField[@ type=‘XCUIElementTypeTextField’ and @value=‘nter or paste up to 30 VINs’]

HOME BUTTON

//XCUIElementTypeButton[@ type=‘XCUIElementTypeButton’ and @name = ‘HOME’ and @label =‘HOME’]

--------:I am providing few line of page source here:—

      </XCUIElementTypeOther>

      <XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="-231" y="126" width="230" height="40">

        <XCUIElementTypeButton type="XCUIElementTypeButton" name="VW GOOGLE SEARCH" label="VW GOOGLE SEARCH" enabled="true" visible="false" x="-231" y="126" width="229" height="40"/>

        <XCUIElementTypeImage type="XCUIElementTypeImage" name="sub-link-inactive" enabled="true" visible="false" x="-230" y="126" width="40" height="40"/>

      </XCUIElementTypeOther>

      <XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="-231" y="171" width="230" height="40">

        <XCUIElementTypeButton type="XCUIElementTypeButton" name="LOGOUT" label="LOGOUT" enabled="true" visible="false" x="-231" y="171" width="229" height="40"/>

--------------------->>>>>>>>>>>>>>>>>> Other sencond query:-

how to use “driver.findElement(MobileBy.iOSNsPredicateString” and “driver.findElement(MobileBy.iOSClassChain” with example,

  • created

    Jun '18
  • last reply

    Jun '18
  • 3

    replies

  • 534

    views

  • 3

    users

  • 1

    like

  • 1

    link

Generally automation speed in iOS is slow as compared to Android, if page has large number of elements it become more slow. Instead of xpath try to use accesibilityID or predicate string:-

driver.findElementByAccessibilityId(“SUBMIT”);

driver.findElement(MobileBy.iOSNsPredicateString(“type == ‘XCUIElementTypeButton’ AND name == ‘SUBMIT’”));

This may improve execution speed.

Hi Isha,

Thank you so much for your help and reply… today i used iOSNsPredicateString as locator and its fast as compare to xpath… but its still taking 1 min for performing task… accesibilityID is not present on page… could you plz guid me how to improve execution speed.