TestProject incorrectly determines the coordinates of the element

  • 2 Replies
  • 371 Views
Hi All,
I am using TestProject to record KAYAK app on Samsung galaxy A5 device with Android. HOwever, TestProject incorrectly determines the coordinates of the element. Could you please refer a attached video and give me advise, thank you very much
My laptop :  windows 10 with screen resolution :1366x768.
https://drive.google.com/file/d/1Pg3xP11O1_BbBzhkDA8F4kB98NdwL-gU/view?usp=sharing

Re: TestProject incorrectly determines the coordinates of the element
« Reply #1 on: July 28, 2018, 15:59:22 pm »
Hi Son,

Even-though the element is not highlighted correctly in the element inspector, please try using it in your code.
Also, please pay attention that there are more than one element - there are 4 matches.

You can use a hierarchical XPATH or a smart XPATH as following to find the right one:
//android.widget.LinearLayout[@package = 'com.kayak.android' and contains(@resource-id , 'legsContainer’)][1]

Notice the indexer suffix: [1]
 
« Last Edit: July 28, 2018, 16:24:22 pm by Marat Strelets »

Re: TestProject incorrectly determines the coordinates of the element
« Reply #2 on: July 30, 2018, 16:32:11 pm »
Thank you, the issue is resolved

 

Sitemap 1 2 3 4 5 6 7 8