• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java UiScrollable类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中android.support.test.uiautomator.UiScrollable的典型用法代码示例。如果您正苦于以下问题:Java UiScrollable类的具体用法?Java UiScrollable怎么用?Java UiScrollable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



UiScrollable类属于android.support.test.uiautomator包,在下文中一共展示了UiScrollable类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: openAppTest

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
@Test
public void openAppTest() throws Exception {
    UiDevice mDevice = UiDevice.getInstance(getInstrumentation());
    mDevice.pressHome();
    // Bring up the default launcher by searching for a UI component
    // that matches the content description for the launcher button.
    UiObject allAppsButton = mDevice
            .findObject(new UiSelector().description("Apps"));

    // Perform a click on the button to load the launcher.
    allAppsButton.clickAndWaitForNewWindow();
    // Context of the app under test.
    Context appContext = InstrumentationRegistry.getTargetContext();

    assertEquals("com.wbrawner.simplemarkdown", appContext.getPackageName());
    UiScrollable appView = new UiScrollable(new UiSelector().scrollable(true));
    UiSelector simpleMarkdownSelector = new UiSelector().text("Simple Markdown");
    appView.scrollIntoView(simpleMarkdownSelector);
    mDevice.findObject(simpleMarkdownSelector).clickAndWaitForNewWindow();
}
 
开发者ID:wbrawner,项目名称:SimpleMarkdown,代码行数:21,代码来源:MainActivityTests.java


示例2: testB

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
/**
 * 滑动界面,打开About phone选项
 * 测试环境为标准Android 7.1.1版本,不同设备控件查找方式会有不同
 *
 * @throws UiObjectNotFoundException
 */
public void testB() throws UiObjectNotFoundException {
    // 获取设备对象
    Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
    UiDevice uiDevice = UiDevice.getInstance(instrumentation);
    // 获取上下文
    Context context = instrumentation.getContext();

    // 点击Settings按钮
    UiObject uiObject = uiDevice.findObject(new UiSelector().description("Settings"));
    uiObject.click();

    // 滑动列表到最后,点击About phone选项
    UiScrollable settings = new UiScrollable(new UiSelector().className("android.support.v7.widget.RecyclerView"));
    UiObject about = settings.getChildByText(new UiSelector().className("android.widget.LinearLayout"), "About phone");
    about.click();

    // 点击设备返回按钮
    uiDevice.pressBack();
    uiDevice.pressBack();
}
 
开发者ID:alidili,项目名称:Demos,代码行数:27,代码来源:UiTest.java


示例3: test009SearchByTitle

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
@Category(CategoryAppStoreTests_v3_3_15.class)
@Test
public void test009SearchByTitle() throws UiObjectNotFoundException {
    TestUtils.screenshotCap("appStoreHome");
    UiObject2 hotOne = device.findObject(By.res("woyou.market:id/linear_hot_view")).findObject(By.res("woyou.market:id/tv_name"));
    String targetAppName = hotOne.getText();
    UiObject2 searchObj = device.findObject(By.res("woyou.market:id/tv_search").text("搜索"));
    searchObj.click();
    TestUtils.screenshotCap("afterClickSearchBar");
    TestUtils.sleep(SHORT_SLEEP);
    UiObject2 searchObj1 = device.findObject(By.res("woyou.market:id/et_search").text("搜索").focused(true));
    searchObj1.click();
    searchObj1.setText(targetAppName);
    TestUtils.screenshotCap("inputSearchContent");
    UiScrollable appList = new UiScrollable(new UiSelector().resourceId("woyou.market:id/list_view"));
    UiObject appInfo = appList.getChildByInstance(new UiSelector().className("android.widget.FrameLayout"),0);
    UiObject appNameObj = appInfo.getChild(new UiSelector().resourceId("woyou.market:id/tv_name"));
    Assert.assertEquals(targetAppName,appNameObj.getText());
}
 
开发者ID:sunmiqa,项目名称:SunmiAuto,代码行数:20,代码来源:SunmiAppStore_v3_3_15.java


示例4: test020EnterFeedback

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
@Category(CategoryAppStoreTests_v3_3_15.class)
    @Test
    public void test020EnterFeedback() throws UiObjectNotFoundException {
        TestUtils.screenshotCap("appStoreHome");
        UiObject2 mineEntrence = device.findObject(By.res("woyou.market:id/fab_me"));
        mineEntrence.clickAndWait(Until.newWindow(),LONG_WAIT);
        TestUtils.screenshotCap("mineHome");
        UiScrollable mineScroll = new UiScrollable(new UiSelector().className("android.widget.ScrollView"));
        mineScroll.scrollTextIntoView("反馈");
        TestUtils.screenshotCap("ScrollToFeedbackInterface");
        UiObject2 feedbackObj = device.findObject(By.text("反馈"));
        feedbackObj.clickAndWait(Until.newWindow(),LONG_WAIT);
        TestUtils.screenshotCap("enterFeedbackInterface");
        String currentPkgName = device.getCurrentPackageName();
//        for (int i = 0; i <10 ; i++) {
//            Log.v("myautotest1",device.getCurrentPackageName());
//            sleep(500);
//        }
        Assert.assertEquals("期望当前包名为com.sunmi.userfeedback,而实际为"+currentPkgName,"com.sunmi.userfeedback",currentPkgName);
    }
 
开发者ID:sunmiqa,项目名称:SunmiAuto,代码行数:21,代码来源:SunmiAppStore_v3_3_15.java


示例5: test024CommentBeforeInstall

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
@Category(CategoryAppStoreTests_v3_3_15.class)
@Test
public void test024CommentBeforeInstall() throws IOException, UiObjectNotFoundException {
    TestUtils.screenshotCap("appStoreHome");
    UiObject2 hotObj = device.findObject(By.res("woyou.market:id/tv_hot_all").text("全部"));
    hotObj.clickAndWait(Until.newWindow(), LONG_WAIT);
    TestUtils.screenshotCap("hotAllInterface");
    UiScrollable hotAllScroll = new UiScrollable(new UiSelector().resourceId("woyou.market:id/list_view"));
    hotAllScroll.scrollIntoView(new UiSelector().resourceId("woyou.market:id/id_tv_install_view").text("安装"));
    TestUtils.screenshotCap("scrollInstallBtnInterface");
    UiObject2 installObj = device.findObject(By.res("woyou.market:id/id_tv_install_view").text("安装"));
    UiObject2 fullAppObj = installObj.getParent().getParent();
    fullAppObj.clickAndWait(Until.newWindow(),LONG_WAIT);
    TestUtils.screenshotCap("uninstalledAppDetail");
    UiObject2 commentObj = device.findObject(By.res("woyou.market:id/tv_install_comment_app"));
    commentObj.clickAndWait(Until.newWindow(),LONG_WAIT);
    TestUtils.screenshotCap("afterClickComment");
    UiObject2 rateObj = device.findObject(By.res("woyou.market:id/rating_bar"));
    Assert.assertNull(rateObj);
}
 
开发者ID:sunmiqa,项目名称:SunmiAuto,代码行数:21,代码来源:SunmiAppStore_v3_3_15.java


示例6: test025CommentAfterInstall

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
@Category(CategoryAppStoreTests_v3_3_15.class)
@Test
public void test025CommentAfterInstall() throws UiObjectNotFoundException {
    TestUtils.screenshotCap("appStoreHome");
    UiObject2 hotObj = device.findObject(By.res("woyou.market:id/tv_hot_all").text("全部"));
    hotObj.clickAndWait(Until.newWindow(), LONG_WAIT);
    TestUtils.screenshotCap("hotAllInterface");
    UiScrollable hotAllScroll = new UiScrollable(new UiSelector().resourceId("woyou.market:id/list_view"));
    hotAllScroll.scrollIntoView(new UiSelector().resourceId("woyou.market:id/id_tv_install_view").text("打开"));
    UiObject2 installObj = device.findObject(By.res("woyou.market:id/id_tv_install_view").text("打开"));
    UiObject2 fullAppObj = installObj.getParent().getParent();
    fullAppObj.clickAndWait(Until.newWindow(),LONG_WAIT);
    TestUtils.screenshotCap("enterAppDetail");
    UiObject2 commentObj = device.findObject(By.res("woyou.market:id/tv_install_comment_app"));
    commentObj.clickAndWait(Until.newWindow(),LONG_WAIT);
    device.wait(Until.hasObject(By.res("woyou.market:id/rating_bar")),LONG_WAIT);
    TestUtils.screenshotCap("afterClickComment");
    UiObject2 rateObj = device.findObject(By.res("woyou.market:id/rating_bar"));
    Assert.assertNotNull(rateObj);
    device.pressBack();
}
 
开发者ID:sunmiqa,项目名称:SunmiAuto,代码行数:22,代码来源:SunmiAppStore_v3_3_15.java


示例7: test026FoldupAppDetail

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
@Category(CategoryAppStoreTests_v3_3_15.class)
@Test
public void test026FoldupAppDetail() throws UiObjectNotFoundException {
    TestUtils.screenshotCap("appStoreHome");
    UiObject2 hotObj = device.findObject(By.res("woyou.market:id/tv_hot_all").text("全部"));
    hotObj.clickAndWait(Until.newWindow(), LONG_WAIT);
    TestUtils.screenshotCap("hotAllInterface");
    UiScrollable hotAllScroll = new UiScrollable(new UiSelector().resourceId("woyou.market:id/list_view"));
    UiObject fullAppObj = hotAllScroll.getChild(new UiSelector().className("android.widget.FrameLayout"));
    fullAppObj.clickAndWaitForNewWindow(LONG_WAIT);
    TestUtils.screenshotCap("enterAppDetail");
    UiObject2 foldupButton = device.findObject(By.res("woyou.market:id/iv_arrow"));
    foldupButton.clickAndWait(Until.newWindow(),LONG_WAIT);
    TestUtils.screenshotCap("foldUpAppDetail");
    UiScrollable hotAllScroll1 = new UiScrollable(new UiSelector().resourceId("woyou.market:id/list_view"));
    Assert.assertNotNull(hotAllScroll1);
}
 
开发者ID:sunmiqa,项目名称:SunmiAuto,代码行数:18,代码来源:SunmiAppStore_v3_3_15.java


示例8: test009SearchByTitle

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
@Test
public void test009SearchByTitle() throws UiObjectNotFoundException {
    TestUtils.screenshotCap("appStoreHome");
    UiObject2 hotOne = device.findObject(By.res("woyou.market:id/linear_hot_view")).findObject(By.res("woyou.market:id/tv_name"));
    String targetAppName = hotOne.getText();
    UiObject2 searchObj = device.findObject(By.res("woyou.market:id/tv_search").text("搜索"));
    searchObj.click();
    TestUtils.screenshotCap("afterClickSearchBar");
    TestUtils.sleep(SHORT_SLEEP);
    UiObject2 searchObj1 = device.findObject(By.res("woyou.market:id/et_search").text("搜索").focused(true));
    searchObj1.click();
    searchObj1.setText(targetAppName);
    TestUtils.screenshotCap("inputSearchContent");
    UiScrollable appList = new UiScrollable(new UiSelector().resourceId("woyou.market:id/list_view"));
    UiObject appInfo = appList.getChildByInstance(new UiSelector().resourceId("woyou.market:id/app_view"),0);
    UiObject appNameObj = appInfo.getChild(new UiSelector().resourceId("woyou.market:id/tv_name"));
    Assert.assertEquals("搜索结果列表第一个应用不是"+targetAppName,targetAppName,appNameObj.getText());
}
 
开发者ID:sunmiqa,项目名称:SunmiAuto,代码行数:19,代码来源:SunmiAppStore.java


示例9: test024CommentBeforeInstall

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
@Test
public void test024CommentBeforeInstall() throws IOException, UiObjectNotFoundException {
    TestUtils.screenshotCap("appStoreHome");
    UiObject2 hotObj = device.findObject(By.res("woyou.market:id/tv_hot_all").text("全部"));
    hotObj.clickAndWait(Until.newWindow(), LONG_WAIT);
    TestUtils.screenshotCap("hotAllInterface");
    UiScrollable hotAllScroll = new UiScrollable(new UiSelector().resourceId("woyou.market:id/list_view"));
    hotAllScroll.scrollIntoView(new UiSelector().resourceId("woyou.market:id/tv_install").text("安装"));
    TestUtils.screenshotCap("scrollInstallBtnInterface");
    UiObject2 installObj = device.findObject(By.res("woyou.market:id/tv_install").text("安装"));
    UiObject2 fullAppObj = installObj.getParent().getParent();
    fullAppObj.clickAndWait(Until.newWindow(),LONG_WAIT);
    TestUtils.screenshotCap("uninstalledAppDetail");
    UiObject2 commentObj = device.findObject(By.res("woyou.market:id/tv_install_comment_app"));
    commentObj.clickAndWait(Until.newWindow(),LONG_WAIT);
    TestUtils.screenshotCap("afterClickComment");
    UiObject2 rateObj = device.findObject(By.res("woyou.market:id/rating_bar"));
    Assert.assertNull(rateObj);
}
 
开发者ID:sunmiqa,项目名称:SunmiAuto,代码行数:20,代码来源:SunmiAppStore.java


示例10: test025CommentAfterInstall

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
@Test
public void test025CommentAfterInstall() throws UiObjectNotFoundException {
    TestUtils.screenshotCap("appStoreHome");
    UiObject2 hotObj = device.findObject(By.res("woyou.market:id/tv_hot_all").text("全部"));
    hotObj.clickAndWait(Until.newWindow(), LONG_WAIT);
    TestUtils.screenshotCap("hotAllInterface");
    UiScrollable hotAllScroll = new UiScrollable(new UiSelector().resourceId("woyou.market:id/list_view"));
    hotAllScroll.scrollIntoView(new UiSelector().resourceId("woyou.market:id/tv_install").text("打开"));
    UiObject2 installObj = device.findObject(By.res("woyou.market:id/tv_install").text("打开"));
    UiObject2 fullAppObj = installObj.getParent().getParent();
    fullAppObj.clickAndWait(Until.newWindow(),LONG_WAIT);
    TestUtils.screenshotCap("enterAppDetail");
    UiObject2 commentObj = device.findObject(By.res("woyou.market:id/tv_install_comment_app"));
    commentObj.clickAndWait(Until.newWindow(),LONG_WAIT);
    device.wait(Until.hasObject(By.res("woyou.market:id/rating_bar")),LONG_WAIT);
    TestUtils.screenshotCap("afterClickComment");
    UiObject2 rateObj = device.findObject(By.res("woyou.market:id/rating_bar"));
    Assert.assertNotNull(rateObj);
    device.pressBack();
}
 
开发者ID:sunmiqa,项目名称:SunmiAuto,代码行数:21,代码来源:SunmiAppStore.java


示例11: test026FoldupAppDetail

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
@Test
public void test026FoldupAppDetail() throws UiObjectNotFoundException {
    TestUtils.screenshotCap("appStoreHome");
    UiObject2 hotObj = device.findObject(By.res("woyou.market:id/tv_hot_all").text("全部"));
    hotObj.clickAndWait(Until.newWindow(), LONG_WAIT);
    TestUtils.screenshotCap("hotAllInterface");
    UiScrollable hotAllScroll = new UiScrollable(new UiSelector().resourceId("woyou.market:id/list_view"));
    UiObject fullAppObj = hotAllScroll.getChild(new UiSelector().resourceId("woyou.market:id/app_view"));
    fullAppObj.clickAndWaitForNewWindow(LONG_WAIT);
    TestUtils.screenshotCap("enterAppDetail");
    UiObject2 foldupButton = device.findObject(By.res("woyou.market:id/iv_arrow"));
    foldupButton.clickAndWait(Until.newWindow(),LONG_WAIT);
    TestUtils.screenshotCap("foldUpAppDetail");
    UiScrollable hotAllScroll1 = new UiScrollable(new UiSelector().resourceId("woyou.market:id/list_view"));
    Assert.assertNotNull(hotAllScroll1);
}
 
开发者ID:sunmiqa,项目名称:SunmiAuto,代码行数:17,代码来源:SunmiAppStore.java


示例12: mainActivity_changeGridSize

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
@Test
public void mainActivity_changeGridSize() throws Exception {
    UiScrollable recycleView = new UiScrollable(new UiSelector().resourceId("com.fantasyfang.googletrendapp:id/trendRecycleView")
            .className(RecyclerView.class));//recycleView.click();
    UiObject item = recycleView.getChild(new UiSelector().resourceId("com.fantasyfang.googletrendapp:id/googleTrendView"));
    item.click();

    String gridDescription = InstrumentationRegistry.getInstrumentation().getTargetContext().getString(R.string.choose_grid);
    UiObject grid = mDevice.findObject(new UiSelector().descriptionContains(gridDescription));
    grid.click();

    UiObject gridList = mDevice.findObject(new UiSelector().text("2*2"));
    gridList.click();
    mDevice.waitForIdle();
    takeScreenShot("Change_grid_to_2_2.jpg");
    mDevice.pressHome();
    takeScreenShot("Home.jpg");
}
 
开发者ID:fantasy1022,项目名称:FancyTrendView,代码行数:19,代码来源:GoogleTrendActivityUiAutomatorTest.java


示例13: turnOnAccessibilityPermission

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
public static void turnOnAccessibilityPermission() throws UiObjectNotFoundException {
    UiScrollable texterScreen = new UiScrollable(LauncherHelper.LAUNCHER_CONTAINER);
    texterScreen.setAsVerticalList();

    UiObject permission = new UiObject(
            new UiSelector().text("Off"));

    permission.click();

    UiScrollable permissionScreen = new UiScrollable(LauncherHelper.LAUNCHER_CONTAINER);
    permissionScreen.setAsVerticalList();

    UiObject permissionButton = new UiObject(
            new UiSelector().text("OK"));

    permissionButton.click();
}
 
开发者ID:bhubie,项目名称:Expander,代码行数:18,代码来源:TestUtils.java


示例14: clickListViewItem

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
public static boolean clickListViewItem(String name) {
    UiScrollable listView = new UiScrollable(new UiSelector());
    listView.setMaxSearchSwipes(4);
    listView.waitForExists(3000);
    UiObject listViewItem;
    try {
        if (listView.scrollTextIntoView(name)) {
            listViewItem = listView.getChildByText(new UiSelector()
                    .className(TextView.class.getName()), "" + name + "");
            listViewItem.click();
        } else {
            return false;
        }
    } catch (UiObjectNotFoundException e) {
        return false;
    }
    return true;
}
 
开发者ID:akvo,项目名称:akvo-caddisfly,代码行数:19,代码来源:TestUtil.java


示例15: test022Search

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
@Test
public void test022Search() throws UiObjectNotFoundException {
    if("V1".equals(Build.MODEL) || "P1".equals(Build.MODEL)){
        Log.v("myautotest1","233333333");
        UiObject2 searchBtnObj = device.findObject(By.res("com.android.settings:id/search"));
        searchBtnObj.clickAndWait(Until.newWindow(),LONG_WAIT);
        UiObject2 searchTextObj = device.findObject(By.focused(true));
        searchTextObj.setText("W");
        UiScrollable resultScroll = new UiScrollable(new UiSelector().resourceId("com.android.settings:id/list_results"));
        Boolean searched = resultScroll.scrollTextIntoView("WLAN");
        Assert.assertTrue("未搜索到要查找的WLAN",searched);
    }
}
 
开发者ID:sunmiqa,项目名称:SunmiAuto,代码行数:14,代码来源:SunmiSettings.java


示例16: test063CheckShowPasswordStatus

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
@Test
public void test063CheckShowPasswordStatus() throws UiObjectNotFoundException {
    if("V1".equals(Build.MODEL) || "P1".equals(Build.MODEL)) {
        UiScrollable SettingScoll = new UiScrollable(new UiSelector().resourceId("android:id/content"));
        SettingScoll.scrollTextIntoView("安全");
        device.findObject(By.text("安全")).clickAndWait(Until.newWindow(), 5000);
        UiScrollable SwitchScoll = new UiScrollable(new UiSelector().resourceId("android:id/list"));
        SwitchScoll.scrollTextIntoView("显示密码");
        UiObject2 SwitchObj = device.findObjects(By.res("android:id/switchWidget")).get(0);
        Assert.assertTrue("测试失败,显示密码默认不是打开", SwitchObj.isChecked());

    }
}
 
开发者ID:sunmiqa,项目名称:SunmiAuto,代码行数:14,代码来源:SunmiSettings.java


示例17: test067CheckAutoGetTimeZoneStatus

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
@Test
public void test067CheckAutoGetTimeZoneStatus() throws UiObjectNotFoundException {
    if ("V1".equals(Build.MODEL) || "P1".equals(Build.MODEL));
    UiScrollable SettingScroll = new UiScrollable(new UiSelector().resourceId("android:id/content"));
    SettingScroll.scrollTextIntoView("日期和时间");
    device.findObject(By.text("日期和时间")).clickAndWait(Until.newWindow(),5000);
    UiScrollable DateScroll = new UiScrollable(new UiSelector().resourceId("android:id/list"));
    DateScroll.scrollTextIntoView("自动确定日期和时间");
    UiObject2 DataObj = device.findObjects(By.res("android:id/switchWidget")).get(0);
    Assert.assertTrue("测试失败,自动确定时区开关默认不是打开",DataObj.isChecked());


}
 
开发者ID:sunmiqa,项目名称:SunmiAuto,代码行数:14,代码来源:SunmiSettings.java


示例18: test071Check24HFormatStatus

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
@Test
public void test071Check24HFormatStatus() throws UiObjectNotFoundException {
    if ("V1".equals(Build.MODEL) || "P1".equals(Build.MODEL));
    UiScrollable SettingScroll = new UiScrollable(new UiSelector().resourceId("android:id/content"));
    SettingScroll.scrollTextIntoView("日期和时间");
    device.findObject(By.text("日期和时间")).clickAndWait(Until.newWindow(),5000);
    UiScrollable DataScroll = new UiScrollable(new UiSelector().resourceId("android:id/list"));
    DataScroll.scrollTextIntoView("使用24小时制");
    UiObject2 FormatObj = device.findObjects(By.res("android:id/switchWidget")).get(1);
    Assert.assertTrue("测试失败,使用24小时制开关默认不是打开状态",FormatObj.isChecked());
}
 
开发者ID:sunmiqa,项目名称:SunmiAuto,代码行数:12,代码来源:SunmiSettings.java


示例19: test004HotScroll

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
@Category(CategoryAppStoreTests_v3_3_15.class)
@Test
public void test004HotScroll() throws UiObjectNotFoundException {
    TestUtils.screenshotCap("appStoreHome");
    UiScrollable hotAllScroll = new UiScrollable(new UiSelector().resourceId("woyou.market:id/linear_hot_view"));
    hotAllScroll.scrollToEnd(20, 10);
    hotAllScroll.scrollToBeginning(20, 10);
    TestUtils.screenshotCap("scollInterface");
    UiObject2 hotObj = device.findObject(By.res("woyou.market:id/item_hot_title"));
    Assert.assertNotNull("热门应用Title为能够找到",hotObj);
}
 
开发者ID:sunmiqa,项目名称:SunmiAuto,代码行数:12,代码来源:SunmiAppStore_v3_3_15.java


示例20: test021CheckServiceProvider

import android.support.test.uiautomator.UiScrollable; //导入依赖的package包/类
@Category(CategoryAppStoreTests_v3_3_15.class)
@Test
public void test021CheckServiceProvider() throws UiObjectNotFoundException {
    TestUtils.screenshotCap("appStoreHome");
    UiObject2 mineEntrence = device.findObject(By.res("woyou.market:id/fab_me"));
    mineEntrence.clickAndWait(Until.newWindow(),LONG_WAIT);
    TestUtils.screenshotCap("mineHome");
    UiScrollable mineScroll = new UiScrollable(new UiSelector().className("android.widget.ScrollView"));
    mineScroll.scrollTextIntoView("服务商");
    TestUtils.screenshotCap("ScrollToServicePro");
    UiObject2 serviceProObj = device.findObject(By.text("服务商"));
    Assert.assertNotNull("未找到服务商信息",serviceProObj);
}
 
开发者ID:sunmiqa,项目名称:SunmiAuto,代码行数:14,代码来源:SunmiAppStore_v3_3_15.java



注:本文中的android.support.test.uiautomator.UiScrollable类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java BM25Similarity类代码示例发布时间:2022-05-21
下一篇:
Java ConfigurableNavigationHandler类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap