Forum Discussion

ApplePen's avatar
ApplePen
Community Leader
7 years ago
Solved

I need to get coordinates(X,Y) of the icon in the PC desktop dynamically. How can I do it?

Hi,

 

The icon of the desktop is not a object. The method(object.ScreenLeft)  cannot be use.

I cannot calculate the coordinates of the icon in the desktop.How can I do ?

Actual problem has been attached in the file c.

 

Looking forward for your reply.
Thank you.
---Steven Wang
 

 

 

 

  • Hi,

     

    What is the purpose of getting the desktop icon coordinates?

     

    If you really need it, you can try to get wIconBounds property:

     

3 Replies

  • baxatob's avatar
    baxatob
    Community Hero

    Hi,

     

    What is the purpose of getting the desktop icon coordinates?

     

    If you really need it, you can try to get wIconBounds property:

     

    • ApplePen's avatar
      ApplePen
      Community Leader

      baxatob 

      I have got the coordinates with this property.

      Thank you very much.

      • SanderK's avatar
        SanderK
        Occasional Contributor

        Do you want to use the desktop shortcut to launch an application within your test? In that case I'd suggest adding the application to the Tested Apps so you can launch it from there.