Hello,
I am trying to set slider (volumeslider) value. How can i do this ? I used :
Mouse.ButtonDown -> Mouse.MoveTo -> Mouse.ButtonUp . However, slider's new value has not been correct.
Is another way available for this problem ?
Thanks in advance.
İrem.
How to set slider value on Ranorex?
Re: How to set slider value on Ranorex?
So you want to set the volume on your computer?
Can you show the actual code that you are using...
And by "slider's new value has not been correct", what exactly do you mean? Is the volume slider not being set to where mouse.buttonup is releasing it?
Can you show the actual code that you are using...
And by "slider's new value has not been correct", what exactly do you mean? Is the volume slider not being set to where mouse.buttonup is releasing it?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
Re: How to set slider value on Ranorex?
Hi,
I solved my problem. I was trying to change volume by taking forward slider's indicator. So I used this code :
I solved my problem. I was trying to change volume by taking forward slider's indicator. So I used this code :
Code: Select all
Indicator volumeSliderIndicator = slider.FindChild<Indicator>();
Mouse.MoveTo(volumeSliderIndicator.Element);
Mouse.ButtonDown(System.Windows.Forms.MouseButtons.Left);
Delay.Milliseconds(100);
while( slider.Value < testValue ) {
Mouse.MoveTo(new Point(Mouse.Position.X + 1, Mouse.Position.Y));
Delay.Milliseconds(50);
}
Mouse.ButtonUp(System.Windows.Forms.MouseButtons.Left);