calabash / calabash-android-server

Automated Functional testing for Android based on cucumber
Other
28 stars 41 forks source link

seekbar sliding option using uiautomator #119

Closed ManjunathaThimmaiah closed 1 year ago

ManjunathaThimmaiah commented 1 year ago

Adding support for android Seekbar in compose screen, It can be flicked and scrolled by using following uiautomator method

perform_action('uiautomator_seek_bar', 'strategy', 'selector', 'percentage', 'direction', 'speed')

strategy: can be example: class, res, desc.. selector: is value from the strategy example : "android.widget.SeekBar" direction: RIGHT, LEFT percentage: value is between 0.0F and 1.0F speed: speed at which the seek bar can be swiped, by default it is set to 10 and it is optional field.

For example:

If the seek bar needs to be scrolled from left to right perform_action('uiautomator_seek_bar', 'clazz', 'android.widget.SeekBar', '0.5', 'RIGHT', '50')

If the seek bar needs to be scrolling from right to left perform_action('uiautomator_seek_bar', 'clazz', 'android.widget.SeekBar', '0.5', 'LEFT', '50')