Mouse scroll to question

Hi,
How does mouse scroll to element work when the scroller is already in the end and the element is in the middle?

Thank you,

Hi @A_Learner

If you want to scroll up then select the Up option in the Direction dropdown for the Mouse scroll activity.

Check the below image for better understanding,
image

Hope it helps!!

@mkankatala
I do not know where the element would be in the scroll area.
So how can I write code to up or down?

Thank you,

@A_Learner


Give the scroll count in your selected area if your selected area takes 5 scrolls then give 5 if 6 give 6 scrolls or identify the Unique element

Thank you.

The direction is the question. The scroller reached end of the scroll area or at the top.
This is random, when we arrive at the page, we do not know where the scroller would be. How do we know to scroll up or down. I end up not finding the element.

thank you,

@A_Learner
Element Exists activity → Check if the element is visible
If element is not visible:

  • Check scroll position (top)
  • Calculate scroll direction (up or down based on element’s position)
  • Use Scroll activity to move the viewport
    else
    Check scroll position (bottom)
  • Calculate scroll direction (up or down based on element’s position)
  • Use Scroll activity to move the viewport

You have to take condition first you have to check the element in one direction for example Top.if the element is not appears in that direction then it has to check in another direction

Okay @A_Learner

No Problem you can select Up or down in the Direction dropdown. But in the Scroll to element indicate the Ui element where you want to scroll.

It will scroll up if it was in the down of the page, it scroll down if it was in the top of the page. But it will scroll up or down untill the Ui element appears to the bot.

It is working I have checked.

Hope you understand!!

2 Likes

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