[Studio] How do I write test steps to interact with android.widget.SeekBar?

Hi Katalon forum,

I need help in scrolling seekbar (eg: android.widget.SeekBar) as well as scrolling the seekbar to select a particular time(eg: 7:00 AM) → please see below images.

FYI: I’ve manged to scroll horizontally, need help with selecting time.(refer image 2)

Anyone knows how I could achieve this within Studio? Any suggestions are greatly appreciated!


1 Like

Hi,

I found the doc about it: [Mobile] Set Slider Value | Katalon Docs. You can take a look

Hi Elly,
Thanks for responding. I tried that way but it didn’t worked for me. Also using that setSliderValue() method we are able to scroll in some percentages. My use case is to scroll to a fixed number, (let’s say I want to select 03: 30) using setslidervalue() that is not possible. any other way to achieve this functionality?

What you could possible try is to loop where you keep “scroll[ing] in some percentages” until you come upon your fixed number. It sounds like you already have something working, so just work on that until you read or hear of something better.

Note: initially, I would have two exits–one when you encounter your fixed number and another based on a counter, like 10 moves and you can exit your loop, just so you don’t get into an endless loop.

Can you try Set Text? Also, this looks like a spinner, maybe this would help?