hi every one, i want to ask How to get position element uipath on screen in to x,y variable, after that we can use mouse click activity enter x,y and click again.
When i use get position activity save to “rectangle” variabe and put rectangle.X ,rectangle.Y into Hover activity, it is on different position than the position that i get.
Hello @Bin_Bin,
I would heavily advise against using the X and Y coordinates for any activities within UiPath. The moment you change resolution, change PCs or even the slightest UI upgrade to an application will break the automation and result in error.
I would instead use the underlying selectors to position where and what you want to click.
Best,
i use activity in one machine, you can see the image in post, and i dont know why get position is different from Hover position
Instead of using the Get Position activity why don’t you select the element with the Hover activity?
thanks @Cameron_McMahon1 , you make me come up with idea
My pleasure sir, good luck automating!
it have not yet work, i hover on button,step 1: i get x, y position by System.Windows.Forms.Cursor.Position. , and step 2: i set x,y into click activity, but position Step 1 and step 2 is different, i dont know why?
Hey @Bin_Bin
First point is not to be dependent on the element position as it is already discussed.
So now you can hover and click directly.
Also kindly show us the screenshot of the elements on the UI Screen or the application on which you want to automate !
Thanks
#nK
Hello @Bin_Bin
What kind of application are you automating??? Is there any challeng in usjng normal click activities with the proper selectors???
its simple a button on web, and i want after close the messenger box, the mouse click at the fist position (at button).
test mouse position.xaml (14.4 KB)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.