本文整理汇总了Java中tools.fastlane.screengrab.UiAutomatorScreenshotStrategy类的典型用法代码示例。如果您正苦于以下问题:Java UiAutomatorScreenshotStrategy类的具体用法?Java UiAutomatorScreenshotStrategy怎么用?Java UiAutomatorScreenshotStrategy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UiAutomatorScreenshotStrategy类属于tools.fastlane.screengrab包,在下文中一共展示了UiAutomatorScreenshotStrategy类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: takeScreenshot
import tools.fastlane.screengrab.UiAutomatorScreenshotStrategy; //导入依赖的package包/类
@TargetApi(27)
@Test
public void takeScreenshot() {
Screengrab.setDefaultScreenshotStrategy(new UiAutomatorScreenshotStrategy());
Intent grouchyIntent = new Intent();
// intent stuff
grouchyIntent.putExtra(SSConstants.SS_QUARTERLY_INDEX_EXTRA, Locale.getDefault().getLanguage()+"-2018-01");
activityRule.launchActivity(grouchyIntent);
SystemClock.sleep(2000);
Screengrab.screenshot("lessons_screen");
}
开发者ID:Adventech,项目名称:sabbath-school-android,代码行数:14,代码来源:SSLessonsActivityTest.java
示例2: setUp
import tools.fastlane.screengrab.UiAutomatorScreenshotStrategy; //导入依赖的package包/类
@Before
public void setUp() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Screengrab.setDefaultScreenshotStrategy(new UiAutomatorScreenshotStrategy());
}
activityRule.getActivity();
LocaleUtil.changeDeviceLocaleTo(LocaleUtil.getTestLocale());
}
开发者ID:breadwallet,项目名称:breadwallet-android,代码行数:9,代码来源:JUnit4StyleTests.java
示例3: setUp
import tools.fastlane.screengrab.UiAutomatorScreenshotStrategy; //导入依赖的package包/类
@Before public void setUp() {
Screengrab.setDefaultScreenshotStrategy(new UiAutomatorScreenshotStrategy());
}
开发者ID:vanniktech,项目名称:Emoji,代码行数:4,代码来源:ScreenshotsTest.java
示例4: takeScreenshot
import tools.fastlane.screengrab.UiAutomatorScreenshotStrategy; //导入依赖的package包/类
@TargetApi(23)
@Test
public void takeScreenshot() {
Screengrab.setDefaultScreenshotStrategy(new UiAutomatorScreenshotStrategy());
Intent grouchyIntent = new Intent();
// intent stuff
grouchyIntent.putExtra(SSConstants.SS_LESSON_INDEX_EXTRA, Locale.getDefault().getLanguage()+"-2018-01-01");
activityRule.launchActivity(grouchyIntent);
SystemClock.sleep(2000);
// en-2016-04-06-03
// "type:textContent|233$387$9$highlight_yellow$|388$548$10$highlight_blue$"
// HashMap<String, String> highlights = new HashMap<String, String>(){{
// put("en", "type:textContent|233$387$9$highlight_yellow$|388$548$10$highlight_blue$");
// put("de", "type:textContent|205$252$1$highlight_yellow$|257$375$2$highlight_green$");
// put("es", "type:textContent|247$319$1$highlight_yellow$|362$434$2$highlight_blue$");
// put("fr", "type:textContent|278$356$1$highlight_yellow$|410$502$2$highlight_green$");
// put("pt", "type:textContent|124$215$1$highlight_yellow$|273$393$2$highlight_green$");
// put("ru", "type:textContent|256$339$1$highlight_yellow$|340$401$2$highlight_green$");
// put("tr", "type:textContent|143$206$1$highlight_green$|280$384$2$highlight_yellow$");
// put("uk", "type:textContent|227$308$1$highlight_yellow$|309$359$2$highlight_green$");
// }};
//
// activityRule.getActivity().binding.ssReadingView.setReadHighlights(new SSReadHighlights(Locale.getDefault().getLanguage()+"-2017-03-04-03", highlights.get(Locale.getDefault().getLanguage())));
SystemClock.sleep(2000);
Screengrab.screenshot("reading_screen");
onView(withId(R.id.ss_reading_menu_display_options)).perform(click());
SystemClock.sleep(2000);
Screengrab.screenshot("reading_screen_display_options");
SystemClock.sleep(2000);
ViewActions.pressBack();
activityRule.getActivity().runOnUiThread(new Runnable() {
public void run() {
activityRule.getActivity().binding.ssReadingViewPager.setCurrentItem(0);
}
});
if (!Locale.getDefault().getLanguage().equals("in")
&& !Locale.getDefault().getLanguage().equals("ja")
&& !Locale.getDefault().getLanguage().equals("zh")
&& activityRule.getActivity().ssReadingViewModel.ssReads.get(0).bible.size() > 0){
SSBibleVerses b = activityRule.getActivity().ssReadingViewModel.ssReads.get(0).bible.get(0);
Map.Entry<String,String> entry=b.verses.entrySet().iterator().next();
String v = entry.getKey();
activityRule.getActivity().ssReadingViewModel.onVerseClicked(v);
SystemClock.sleep(2000);
Screengrab.screenshot("reading_bible_verses");
}
}
开发者ID:Adventech,项目名称:sabbath-school-android,代码行数:64,代码来源:SSReadingActivityTest.java
示例5: beforeAll
import tools.fastlane.screengrab.UiAutomatorScreenshotStrategy; //导入依赖的package包/类
@BeforeClass
public static void beforeAll()
{
Screengrab.setDefaultScreenshotStrategy(new UiAutomatorScreenshotStrategy());
}
开发者ID:sylvek,项目名称:itracing2,代码行数:6,代码来源:JUnit4StyleTests.java
示例6: takeScreenshot
import tools.fastlane.screengrab.UiAutomatorScreenshotStrategy; //导入依赖的package包/类
@Test
public void takeScreenshot() {
Screengrab.setDefaultScreenshotStrategy(new UiAutomatorScreenshotStrategy());
pressBack();
SystemClock.sleep(1000);
onView(withId(R.id.ss_quarterly_item_featured_title)).perform(click());
// Screengrab.screenshot("quarterlies_screen");
}
开发者ID:Adventech,项目名称:sabbath-school-android,代码行数:13,代码来源:SSQuarterliesActivityTest.java
注:本文中的tools.fastlane.screengrab.UiAutomatorScreenshotStrategy类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论