my first uft script. agenda introduction – uft & perfecto mobile get up and running - download...

16
My First UFT Script

Upload: georgia-nash

Post on 19-Dec-2015

222 views

Category:

Documents


2 download

TRANSCRIPT

My First UFT Script

Agenda• Introduction – UFT & Perfecto Mobile• Get up and running - Download & setup • Working with a mobile device• Write our first script– Get introduced to some basic commands – Add a validation at the end of the script– Run, view and share report

• References & Samples

UFT & Perfecto Mobile

• Devices are visible from within UFT• A new Device Class is created and allows

writing tests on devices• UFT logic – data tables, parameters etc.

remains the same• Objects are created in Object repository– Perfecto object spy is used instead of UFT

spy

Working with a mobile device

• The Device Class Device("DUT") – DUT is Device Under Test– The device is an object

Changing the Device

• Replacing the device id– in the object repository

• Setting the device id in the scriptDevice("DUT").SetTOProperty "device_id","T01130HSIN"

Recording Device Operations

• Recording device operations gets translated into the script– Just like recording on a browser– Objects are created automatically:

Sample Script

• Download script from• Open in UFT– open a device– Set the device ID– Run the script

• View report and video

Understanding the test• Open device• Home• Browser go to• Text checkpoint• Edit set text X2• Button click• Text checkpoint• Close device

Open device and Navigate Home

• Open device• Home – Navigates device to idle

screen– Unlocks device– Recommended to always use

before actual script begins

Browser GoTo• Browser go to– Opens a URL– Browser parameter options• OS – Chrome/Safari/Explorer• Default – According to what is set on the

device• Perfecto Mobile – Legacy browser

Text Checkpoint

– Validates text appears on screen

– Uses OCR to find text– Timeout defines how long

to wait for text to appear

Edit Set & Close Device

• Edit Set Sets a value into an input field– Edit Set is a visual command– User inputs label details &

text to enter

• Close Device makes device available for next script

A word about objects• The device commands create UFT objects that

can be accessed in the object repository• In this sample the following objects were used:– MBrowser -

http://help.perfectomobile.com/article/AA-01611/ – MEdit - http://

help.perfectomobile.com/article/AA-01240 – Mbutton - http://

help.perfectomobile.com/article/AA-01241

Reports

• Every script generates a standard UFT report when run

• Every report contains screenshots & Video

Thank You!