0

I have searched Stackoverflow as well as Google Selendroid forum but didn't find anything useful.

Class of the seekbar: android.view.View

My scenario: I wanna automate swipe gesture on the seekbar of my app.
But when I execute perform() after set flick(), the thread enters infinite waiting.

// Get the seekbar, drv is the instance of SelendroidDriver
WebElement seekbar = getFontSizeSeekbarVw(drv, timeout);

// Initiate a TouchActions with the driver instance to include flick
TouchActions flick = new TouchActions(drv);

// Create flick which will swipe the seekbar to right end.
flick.flick(seekbar, seekbar.getSize().width, 0, FlickAction.SPEED_NORMAL);
flick.perform();

// Debug purpose
System.out.println("Finished.");

I saw the thread is running but there is no any action on that seekbar.
Neither I saw "Finished" is shown up on my Console log.

Does anyone have some idea or suggestion?
Thank you in advance.

holy934
  • 57
  • 9

1 Answers1

0

I have used below code it works best for me -

WebElement seekbar1=driver.findElementById("seekbar_1");
        new TouchActions(driver).flick(seekbar1, 100,433,5).perform();

use driver.getLocation() to Get X and Y co-ordinates.

anuja jain
  • 1,367
  • 13
  • 19