如何在 Appium 中使用 TouchAction 执行快速双击?

问题描述 投票:0回答:0

我正在自动化我的移动键盘,需要快速双击 Shift 键才能锁定大写字母。但是,当我尝试双击 Shift 键时,无法锁定大写字母。

这是我的Java代码。

TouchAction touchAction = new TouchAction(driver);

    //Perform quick Double tap on Shift key
    int shiftx = 90, shifty = 2174;

    PointOption shiftkey = PointOption.point(shiftx, shifty);
    touchAction.tap(shiftkey).perform();
    touchAction.tap(shiftkey).perform();

不断切换到大写字母键盘,然后又切换回小写字母键盘。我认为双击似乎在这里发生得很慢。

请问有人有想法吗?

appium appium-android
© www.soinside.com 2019 - 2024. All rights reserved.