jeudi 4 février 2016

How to make 10 fast clicks [UIautomator]

Im trying to make fast 10 clicks on the button using this

public static void fastClicks(String text, int index) throws Exception {
        Thread.sleep(1000);
        UiObject settingsButton = new UiObject(new UiSelector().resourceId(text).index(index));
        Configurator cc = Configurator.getInstance();
        cc.setActionAcknowledgmentTimeout(10);
        settingsButton.click();
        settingsButton.click();
        settingsButton.click();
        settingsButton.click();
        settingsButton.click();
        settingsButton.click();
        settingsButton.click();
        settingsButton.click();
        settingsButton.click();
        settingsButton.click();
        settingsButton.click();
    }

yes it makes 10 clicks but first click have a little delay or smth like that so it doesnt work properly. All I need this is 10 ritmic cliks with same delay from 1 click to 10. How can I improove this code? Thank you :)

Aucun commentaire:

Enregistrer un commentaire