繁体   English   中英

在Android Instrumentation测试期间无法以编程方式旋转屏幕

[英]Can't rotate screen programmatically during Android Instrumentation testing

我试图将我的android仿真器屏幕旋转到横向模式以触发一些布局更改,但是方法setOrientationLeft()或setOrientationRight()无法正常工作。 请注意,在我的AndroidManifest.xml文件中,我确保活动未设置任何方向。

@Test
public void test4RotateScreenToGetSignature()throws Exception {
    .
    .
    .
    mDevice.setOrientationLeft();
    assertSignatureViewVisible();
    mDevice.swipe(200, 1400, 400, 1600, 10);
    mDevice.swipe(400, 1400, 200, 1600, 10);
    .
    .
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM