Move Slider - Jslider

Ask general questions here.
User avatar
subodh4u7
Posts: 68
Joined: Tue Jan 06, 2015 8:26 am

Move Slider - Jslider

Post by subodh4u7 » Fri Sep 23, 2016 7:07 am

Hi,

I have one java based application where slider is being used using JSlider as attached in the screenshot.

Ranorex spy is not able to identify the slider but its able to identify (0-4) as slider.

Please find the rxrep attached here as well.

I want to move the slider back and forth using automation. Can any one help me to solve this issue.

And also, there are slider with two handles and not able to recognize each handles individually and hence becoming hard to automate such cases. Any suggestion would be highly appreciated.
Attachments
KeePassTestSuiteRepository.rxrep
Subtraction
(23.2 KiB) Downloaded 25 times
Slider.jpg
Slider.jpg (21.26 KiB) Viewed 691 times
Regards,
Subodh

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3947
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Move Slider - Jslider

Post by odklizec » Fri Sep 23, 2016 7:41 am

Hi,

Could you please upload a Ranorex snapshot of the entire slider thing? Repository is not very useful here. If the "slider" button is not recognizable, you will most probably have to change the slider position by clicking at 0...4 positions? Eventually, set the slider position from code. But it's hard to tell without seeing the snapshot and ideally, also a small sample app featuring this slider element.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Martin
Posts: 152
Joined: Fri Aug 15, 2014 12:24 pm

Re: Move Slider - Jslider

Post by Martin » Fri Sep 23, 2016 8:48 am

You might be able to set the TagValue which in turn will change the value for the slider.

But yeah, as odklizec said, can't confirm without a snapshot for the entire slider.

User avatar
subodh4u7
Posts: 68
Joined: Tue Jan 06, 2015 8:26 am

Re: Move Slider - Jslider

Post by subodh4u7 » Fri Sep 23, 2016 9:13 am

I am afraid that I won't be able to share the snapshot because it shows the whole application snapshot and in turn could lead to violation of company policy.
odklizec wrote:Hi,

Could you please upload a Ranorex snapshot of the entire slider thing? Repository is not very useful here. If the "slider" button is not recognizable, you will most probably have to change the slider position by clicking at 0...4 positions? Eventually, set the slider position from code. But it's hard to tell without seeing the snapshot and ideally, also a small sample app featuring this slider element.
Regards,
Subodh

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3947
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Move Slider - Jslider

Post by odklizec » Fri Sep 23, 2016 9:26 am

Well, in this case, there is nothing else we can do for you. Without at least snapshot, it's next to impossible to suggest something reliable. You can either try to set the slider value by clicking the values 0...4 or using SetValue action, as suggested by Martin.

BTW, you can try to save the snapshot with unchecked setting option "Let snapshot contain complete ancestor tree" (Settings >> Advanced tab). This should minimize the snapshot footprint and the amount of elements saved in snapshot. Just make sure there is saved entire parent container, holding all slider elements. Simply track the parent container (Difference image), instead of just slider button).

Edit: I've found a jslider sample and if your slider is not something completely custom-made, SetValue should be the way to go. At least it worked for me.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Move Slider - Jslider

Post by krstcs » Fri Sep 23, 2016 1:50 pm

Be aware that SetValue() (and other InvokeAction methods like Press()) may not fire all events related to entering the value as would keyboard or mouse entry, depending on how the AUT was coded and what element you are Invoking against. You may have to do those yourself.
Shortcuts usually aren't...