How to find desktop applications icon in Xpath?

Ask general questions here.
MaheshShinde
Posts: 6
Joined: Fri Aug 31, 2018 7:22 am

How to find desktop applications icon in Xpath?

Post by MaheshShinde » Wed Sep 12, 2018 8:48 am

i am working on a windows application, and due to versioning issue we need to change version of the application every time, so i need to find icon by x path, which will ignore the x,y co-ordinates recorded. Can you please find me solution?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3945
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to find desktop applications icon in Xpath?

Post by odklizec » Wed Sep 12, 2018 9:03 am

Hi,

I'm afraid, there is not much anyone here can do without, at very least, a Ranorex snapshot (NOT screenshot) of the application/desktop icon in question. Please create and upload the snapshot (either here or using a 3rd party file sharing service, like dropbox or onde drive).
What is the xpath recorded by Ranorex?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

MaheshShinde
Posts: 6
Joined: Fri Aug 31, 2018 7:22 am

Re: How to find desktop applications icon in Xpath?

Post by MaheshShinde » Wed Sep 12, 2018 10:03 am

Hello, Pardon me,

Please find the attached screenshot
xpath.jpg
xpath.jpg (145.66 KiB) Viewed 158 times

MaheshShinde
Posts: 6
Joined: Fri Aug 31, 2018 7:22 am

Re: How to find desktop applications icon in Xpath?

Post by MaheshShinde » Wed Sep 12, 2018 10:06 am

Below is the application icon snapshot
BLSLogisticSuiteShortcut_Screenshot_1a327ef8-aad1-47ce-9993-209e4a4c33cc.jpg
BLSLogisticSuiteShortcut_Screenshot_1a327ef8-aad1-47ce-9993-209e4a4c33cc.jpg (5.05 KiB) Viewed 158 times

MaheshShinde
Posts: 6
Joined: Fri Aug 31, 2018 7:22 am

Re: How to find desktop applications icon in Xpath?

Post by MaheshShinde » Wed Sep 12, 2018 10:32 am

ApplicationIcon.rxsnp
(107.67 KiB) Downloaded 6 times

MaheshShinde
Posts: 6
Joined: Fri Aug 31, 2018 7:22 am

Re: How to find desktop applications icon in Xpath?

Post by MaheshShinde » Wed Sep 26, 2018 11:02 am

I attached all the details, Please help me on this

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3945
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to find desktop applications icon in Xpath?

Post by odklizec » Wed Sep 26, 2018 12:18 pm

Hi,

I'm not quite sure, which of the available icons exactly do you want to select? If you want to dynamically select the shortcut, based of the version number, then you need to adapt the repo element xpath with variable, like this:
/desktop[@processname='explorer']/?/?/list/listitem[@text='BLS.LogisticSuite - Shortcut ' + $versionNumber]
And of course, you need to fill the version number variable before accessing the shortcut. The only problem of the above solution is, that it may not pickup the shortcut, without version number. So make sure all shortcuts use version number and in the same format. Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration