当前位置: 首页>>代码示例>>Java>>正文


Java InstrumentationTestCase.sendKeys方法代码示例

本文整理汇总了Java中android.test.InstrumentationTestCase.sendKeys方法的典型用法代码示例。如果您正苦于以下问题:Java InstrumentationTestCase.sendKeys方法的具体用法?Java InstrumentationTestCase.sendKeys怎么用?Java InstrumentationTestCase.sendKeys使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.test.InstrumentationTestCase的用法示例。


在下文中一共展示了InstrumentationTestCase.sendKeys方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: tapDialogNegativeButton

import android.test.InstrumentationTestCase; //导入方法依赖的package包/类
/**
 * Taps the positive button of a currently displayed dialog. This method assumes that a button
 * of the dialog is currently selected.
 *
 * @see #tapDialogNegativeButton(InstrumentationTestCase)
 */
public static void tapDialogNegativeButton(InstrumentationTestCase testCase) {
  // The order of the buttons is reversed from ICS onwards
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
    testCase.sendKeys("DPAD_RIGHT DPAD_CENTER");
  } else {
    testCase.sendKeys("DPAD_LEFT DPAD_CENTER");
  }
}
 
开发者ID:ocdtrekkie,项目名称:authenticator,代码行数:15,代码来源:TestUtilities.java

示例2: tapDialogPositiveButton

import android.test.InstrumentationTestCase; //导入方法依赖的package包/类
/**
 * Taps the negative button of a currently displayed dialog. This method assumes that a button
 * of the dialog is currently selected.
 *
 * @see #tapDialogNegativeButton(InstrumentationTestCase)
 */
public static void tapDialogPositiveButton(InstrumentationTestCase testCase) {
  // The order of the buttons is reversed from ICS onwards
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
    testCase.sendKeys("DPAD_LEFT DPAD_CENTER");
  } else {
    testCase.sendKeys("DPAD_RIGHT DPAD_CENTER");
  }
}
 
开发者ID:ocdtrekkie,项目名称:authenticator,代码行数:15,代码来源:TestUtilities.java

示例3: tapNegativeButtonIn3ButtonDialog

import android.test.InstrumentationTestCase; //导入方法依赖的package包/类
/**
 * Taps the negative button of a currently displayed 3 button dialog. This method assumes
 * that a button of the dialog is currently selected.
 */
public static void tapNegativeButtonIn3ButtonDialog(InstrumentationTestCase testCase) {
  // The order of the buttons is reversed from ICS onwards
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
    testCase.sendKeys("DPAD_RIGHT DPAD_RIGHT DPAD_CENTER");
  } else {
    testCase.sendKeys("DPAD_LEFT DPAD_LEFT DPAD_CENTER");
  }
}
 
开发者ID:ocdtrekkie,项目名称:authenticator,代码行数:13,代码来源:TestUtilities.java

示例4: tapNeutralButtonIn3ButtonDialog

import android.test.InstrumentationTestCase; //导入方法依赖的package包/类
/**
 * Taps the neutral button of a currently displayed 3 button dialog. This method assumes
 * that a button of the dialog is currently selected.
 */
public static void tapNeutralButtonIn3ButtonDialog(InstrumentationTestCase testCase) {
  // The order of the buttons is reversed from ICS onwards
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
    testCase.sendKeys("DPAD_RIGHT DPAD_CENTER");
  } else {
    testCase.sendKeys("DPAD_RIGHT DPAD_CENTER");
  }
}
 
开发者ID:ocdtrekkie,项目名称:authenticator,代码行数:13,代码来源:TestUtilities.java

示例5: tapPositiveButtonIn3ButtonDialog

import android.test.InstrumentationTestCase; //导入方法依赖的package包/类
/**
 * Taps the positive button of a currently displayed 3 button dialog. This method assumes
 * that a button of the dialog is currently selected.
 */
public static void tapPositiveButtonIn3ButtonDialog(InstrumentationTestCase testCase) {
  // The order of the buttons is reversed from ICS onwards
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
    testCase.sendKeys("DPAD_LEFT DPAD_LEFT DPAD_CENTER");
  } else {
    testCase.sendKeys("DPAD_RIGHT DPAD_RIGHT DPAD_CENTER");
  }
}
 
开发者ID:ocdtrekkie,项目名称:authenticator,代码行数:13,代码来源:TestUtilities.java


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