Perfecto Mobile provides mobile app developers and quality assurance teams a hosted device lab and write-once-run-anywhere test automation for native, hybrid and mobile web apps.
This repository contains code samples use our WebDriver implementation and demonstrates execution with several test frameworks
RWDDownloadReportFileName | Description |
HelloWorld |
Basic code which shows how to work with perfecto cloud, select a device and execute simple webDriver test.
The test open google and search for Perfecto Mobile.
prerequisite: install Perfecto mobile add-in to Eclipse follow these instructions |
JUNITExample | Write your own JUnit with Perfecto Mobile: This example shows how to run Perfecto Mobile test on a real device as a JUnit. It also contains the option to provide the device ID as parameter |
JunitBOFAApp |
This example shows how to execute test on real mobile with native application using visual object only (OCR objects)
prerequisite: install bofa on the iphone device |
JUnitedWeb | This example shows how to run test on website using DOM object and Visual objects for validation. All based on webdriver interface and can be executed on any device in perfecto mobile system. |
uploadAndInstallApp | This code example shows how to use Perfecto Mobile driver to upload and install applications (.ipa or .apk) from local PC to real devices |
TestNG | This code example shows how to run TestNG script on real devices in Perfecto Mobile cloud |
PerfectoCucumber |
This code shows how to run Cucumber (JVM) test on real device in Perfecto Mobile cloud.
The test open the post office web page and validate specific zip code.
The folder contains four files: PostOffice.Feature the test case description in English. PostofficeDefs.java the test case translator between the feature file and the test implementation. PostOffice.java The java code which execute the test on the device in Perfecto Mobile cloud. RunCukesTest.java the test executer |
getDOM | This code shows how to get the DOM object to your code. |
ExecuteJavaScrip | This codes executes Java script on web on real devices. |
executeLowLevelAPI | Perfecto Mobile provides HTTP API which allows the customer to execute any command on perfecto mobile cloud and on any device in the cloud. This code describes how to work with the API, as an example the code execute SMSme command on real device. |
Download report and report attachments | Demonstrates how to download the Perfecto Mobile report to a specified location; and the report attachments. |
Parallel Script Execution | Demonstrates how to execute script on number of devices using Java Executor Interface. |
APK and IPA files upload from PC to cloud folders | Demonstrates how to upload files from user PC to cloud folders. |
Install APK or IPA file across a list of devices | Using findDevices function (based on Manufacturer), opens List of devices and installs appropriate Application on device. |
Using JUnit Annotations | Using @BeforeClass and @AfterClass JUnit Annotations |
RWDTests | This test uses the standard remoteWebDriver to connect the cloud and select the device by properties like "model" and "version". |
RWDDownloadReport | This test uses the standard remoteWebDriver, at the end of the execution it downloads the report from Perfecto cloud into local directory. |
Work with device reservation | Create,update,delete reservations |
getObjectList | Get list of objects with specific property and manipulate it in the code, in this example (carmax.com) all the car items have the class ui-link-inherit and one command bring all the items to java List. more details |
DeviceManagerWiFi | This class manage the WIFI on Android and IOS and allows to trun it on and off and get the WiFi status |
DeviceFactory | This factory return the next available device in Perfecto Mobile cloud based on the OS (Android or iOS) |
UISelect |
work with dropdown menu the code contains two classes: 1. execSelectTest – main class which execute the test on the American express web page. 2. PMUISelect - deprecated code – drop down object manager. 3. PMSelectII - drop down object manager. How to use it: Find the object with xpath: Create new PMUISelect obejct with this item and the WebDriver (dom) Select the iteam by text or index |