microsoft / WinAppDriver

Windows Application Driver
MIT License
3.7k stars 1.4k forks source link

Scroll Bar using WinAppDriver #1751

Open iamkrk opened 2 years ago

iamkrk commented 2 years ago

Hi Team,

I am having vertical scroll bar in my windows application of class ScrollBar and I see the properties "RangeValue.Minimum" and "RangeValue.Maximum" are exposed. Also from inspect tool action menu, I can set the value for "RangeValue.SetValue" and on executing I see the scroll bar is moved accordingly.

Can someone suggest how do we call this method "RangeValue.SetValue" from WinAppDriver?

Looking forward for the support and thanks in advance.

Thanks Karthik image image

iamkrk commented 2 years ago

Looking forward for some support from the community.

Thanks in advance

pdisser8 commented 2 years ago

I'm not actually sure this is possible to set a value this way via the JSON Wire Protocol. I know you can get values like that via this command

/session/:sessionId/element/:id/attribute/:name

So instead of sending a value I suppose you could keep sending Keys.PAGE_DOWN or something and then keep checking the RangeValue.Value. Would be really nice to be able to set values that way though