locked
How to scroll Horizontaly using CodedUI handcode RRS feed

  • Question

  • I need to  scroll the scroll bar horizontally for bring my control in to view. if vertical scrolling it is easy like below

    Mouse.MoveScrollWheel(1) //for scroll up
    
    Mouse.MoveScrollWheel(-1) // for scroll down

    like above code can any one help me to resolve horizontal scrolling by using hand code in CodedUI .

    Regards,


    • Edited by Sharp Gobi Monday, November 2, 2015 12:23 PM spelling mistake corrected
    Monday, November 2, 2015 12:19 PM

Answers

  • Me itself find a way to achieve the Horizontal scrolling  using the same method  as like in Vertical scrolling ,

     Mouse.MoveScrollWheel(-2, ModifierKeys.Shift); //scroll right
    
    Mouse.MoveScrollWheel(2, ModifierKeys.Shift); //scroll left

    thanks,

    Tuesday, November 3, 2015 6:22 AM
  • Hi Sharp,

    Glad to know that you resolve this issue in your side.

    I also find other workarounds, maybe they are helpful for you even if you have found a solution:)

    (1)one idea is that you can do the required scrolling by local below buttons then use Mouse Click action on them.

    (2)Like the Web application. You can try to use Keyboard.SendKeys("{left}") or Keyboard.SendKeys("{left}") to emulate the keyboard behavior.

    Thanks,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, November 3, 2015 7:25 AM

All replies

  • Me itself find a way to achieve the Horizontal scrolling  using the same method  as like in Vertical scrolling ,

     Mouse.MoveScrollWheel(-2, ModifierKeys.Shift); //scroll right
    
    Mouse.MoveScrollWheel(2, ModifierKeys.Shift); //scroll left

    thanks,

    Tuesday, November 3, 2015 6:22 AM
  • Hi Sharp,

    Glad to know that you resolve this issue in your side.

    I also find other workarounds, maybe they are helpful for you even if you have found a solution:)

    (1)one idea is that you can do the required scrolling by local below buttons then use Mouse Click action on them.

    (2)Like the Web application. You can try to use Keyboard.SendKeys("{left}") or Keyboard.SendKeys("{left}") to emulate the keyboard behavior.

    Thanks,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, November 3, 2015 7:25 AM