How to click and drag in a screen (Not drag and drop). Drag and drop includes an element but click and drag has no elements

What activity do I use?

1 Like

Hi @MadLadFuryRoad
Still, I am unsure what you would like to click and drag, what you want to do with it next and how you mean that “click and drag has no elements”. Does it mean that whatever you are trying to click has no unique selector? Would the combination of activities “Click” and “Hover” work for you then at all - as shown here https://www.uipath.com/kb-articles/how-to-automate-drag-and-drop
image

1 Like

HI @PAD,
I want to scroll through a map in a game. So it can be in any direction. I need to click and drag to scroll through the map. There is no unique selector to drag and drop as you mentioned. How do I go forth?

And also can we set a particular angle at which we can click and drag? For example, 45 degrees.

Thanks!

Is there any hotkeys combination that would do the same for you - e.g. somehow using arrows?

1 Like

@PAD
No, there isn’t any other way to scroll other than click and drag.
Scrolling through mouse can do the job, but it can do it only in a vertical manner. I need to movie it in specific angles.

I have just tested something with google maps. If your map is seen as one element, then you need to follow the advice from that link I sent to you. In your “Click” activity select the whole map as your element by “Indicate on screen”, and set up the activity as “Click down”. This will simulate clicking. Then, in “Hover” choose your map as the element again, and what is important, play with OffsetX and OffsetY to move in the required direction (I’ve tested 100 for OffsetX). Next, with another Click set up as “Click up” to release the button and your map as the element again you are making it move. Does this work for you? :slight_smile:

1 Like

drag.xaml (7.9 KB) - it did the job for me. @MadLadFuryRoad, hope it works for you too.

Hi @PAD,
Thanks for the reply. I have already done something similar to this.
Now, can we set a specific angle for the movement of the map?

@MadLadFuryRoad, I believe you can achieve this by playing with OffsetY and X values - e.g. 100 in both fields will move your map equally up and to the left, so 45 degrees. -100 in both fields moves the map down and to the right.

1 Like

@PAD
Thank you so much for your input!

No problem - glad that I could help :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.