Testdroid Recorder 2.5 is out!

Bitbar, the mobile devops company. Logo, large

Hi all,

Like always, we bend over backwards to implement features requested by our customers and to make those innovations available to all Testdroid users. Two weeks ago we released a significant new version of Testdroid Recorder with a capability to also record and play back UI interactions within embedded webview elements. This very useful feature is achieved thanks to new methods in our extSolo library.
Now, based on customer input we have added more features to make webview testing even more powerful. We also implemented few other features and fixed a substantial amount of bugs. The most important things are:

Recognizing HTML elements by XPATH

We added new methods in extSolo library. Now we are able to recognize HTML elements by XPATH. For example, instead of

[sourcecode language=”java”] extSolo.clickOnHtmlElement("a", "id", "", "class", 0);[/sourcecode]

you can use:

[sourcecode language=”java”]
extSolo.clickOnHtmlElement("(//a[@id = ‘id’ and @class = ‘class’])[1]");
[/sourcecode]

XPATH indexes start with 1.
Selecting HTML elements by XPATH may not work on older versions of Android.
Recognizing HTML elements by extra attributes

Next feature is possibility to recognize elements by extra attributes. By default we are recognizing only: tag, id, class and name. In preferences page you can add your own attributes. Just go to Window -> Preferences -> Testdroid -> WebView.

You can easily add and remove custom attributes. The button “Restore Defaults” removes all of them.

For recognizing HTML elements with extra attributes, we added extra methods, which are extended of Map. Map has to have keys as your custom attributes and values as values of attributes. For example:

[sourcecode language=”java”]
extSolo.clickOnHtmlElement("a", "id", "", "class", 0,
new HashMap() {
{
put("custom_id", "my_val");
};
}
);
[/sourcecode]

If you want use XPATH for that:

[sourcecode language=”java”]
extSolo.clickOnHtmlElement("(//a[@id=’id’
and @class=’class’ and @custom_id=’my_val’])[1]");
[/sourcecode]

Ability to inject JavaScript into WebViewThere are two new methods in extSolo library. If you want to inject some small piece of code, you can use injectJavaScriptCode(String code). For example:

[sourcecode language=”java”]
injectJavaScriptCode("alert(‘Testdroid Recorder!’);");
[/sourcecode]

If you want inject some larger amount of code, you can put it in the file and use injectJavaScriptFile(String fileName). This file must be in Assets in the test project. For example:

[sourcecode language=”java”]
injectJavaScriptFile("javascript.js");
[/sourcecode]

Both methods are available in the menu under “Append command” during recording.

New command for changing a device’s languageThere is also new command for changing language on an Android device. It’s changed only for the duration of your test. After playback, language is restored to previous setting. If you want to use this command, make sure, that your application has the necessary permissions to change configurations.

[sourcecode language=”java”]
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION"/>
[/sourcecode]

Bug fixes

  • recording for actions on inputs (WebView)
  • clicks on ‘a’ elements
  • SD card info “Do not show this information again”
  • disabling “I have DEBBUGABLE flag set…” check box during uploading APK file
  • “Run” button in Run Configurations
  • authorization in preferences page
  • focusing another command after deleting
  • class names in First Recording

UpdatingYou can update to the new version directly from Eclipse (About Eclipse -> Installation Details, selecting Testdroid Recorder and clicking Update).

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close