Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Aug 03, 2017 13:26

Perfecto Lab plugin for the different IDE (for example, Eclipse, IntelliJ, Visual Studio) can record actions and functions performed interactively and generates Java or C# code tailored for RemoteWebDriver or Appium Driver.

Preparing for Recording

Click on More->Settings in the upper-right corner of the Perfecto Lab panel of the IDE.

Use the Recording tab of the Settings window to select either the RemoteWebDriver or Appium Driver, and to select the output language.

The Recording tab has two child tabs - Framework and Timing

Use the Framework tab to change the following settings:

Application Framework**: Select either Appium (default) or Perfecto Mobile

Driver: Select RemoteWebDriver (default), or Appium driver, or MobileWebDriver. 

Language: Select the target language to record.

Recording actions

Select the device to use for recording the actions, click on the Record button and perform the actions on the device. The actions may be performed manually on the device using the interface or by performing actions from the Object Spy, and Activity tools (for example, the Select (text, image) or Edit (text, image) tools). The Record button can be found in the following locations:

  • In the function bar of the Perfecto Lab panel (both Eclipse and Visual Studio).
  • Under the Perfecto menu in the Eclipse menu bar or .
  • In the Eclipse Quick Access bar of icons.

The generated code is inserted into the test script at the current cursor location.

Function Recording Table

The following table provides an overview of the code generated for the different functions in the recorder. In addition, the table provides information on the return value generated for functions activated with the executeScript() method.


  • When recording calls to the findElement method the recorder will utilize the different flavors of the findElement method based on the setting of the By parameter supplied to the Object Spy. These include not only the findElement flavors (used for the Click, Set, or Info functions) but also the findElements flavors (used for the Find function). The flavors supported include:
    • findElementByXPath
    • findElementByClassName
    • findElementByLinkText
    • findElementByPartialLinkText
    • findElementByAccessibilityId
    • findElementByIosUIAutomation
  • When noted, in the table, that the recorder generates a context switch, this generates a call to the switchToContext() method for the RemoteWebDriver mode and direct Appium API context() method for AppiumDriver mode.
  • Best Practice: refactor the code by removing superfluous context switching statements, retaining only those that actually change the context setting.

  • The following actions cannot be recorded in RemoteWebDriver mode:

    • Device selection
    • Device open
    • Device close