试验方法记录:
使用Java+appium,查找屏幕外控件,控制seekbar移动。
1.查找并点击Setting中的“辅助功能”;driver.findElementByAndroidUIAutomator
2.滑动“显示”中的seekbar ;driver.swipe(startX, startY, endX, endY, duration)
试验用的老平板,这种系统应用运行的比第三方应用流畅很多。
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import java.net.MalformedURLException;
import java.net.URL;
import io.appium.java_client.android.AndroidDriver;
public class TestSettingsDemo {
public AndroidDriver<?> appiumDriver;
@Before
public void setUp() throws MalformedURLException {
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("platformVersion","5.1.1");
desiredCapabilities.setCapability("platformName","Android");
desiredCapabilities.setCapab