Micro Focus QTP (UFT) Forums
Is it possible to automate without recording - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Is it possible to automate without recording (/Thread-Is-it-possible-to-automate-without-recording)



Is it possible to automate without recording - LalithaAkila - 01-04-2013

Is it possible to automate without recording


RE: Is it possible to automate without recording - nilanjans - 01-08-2013

Hi Lalitha,
Yes it is definitely possible that automation script can be prepared without recording the application. And it is advisable that for better maintainability and efficiency of the code you should not go for "Record/Playback" feature.
Prepared scripts using "Record and playback"are difficult to maintain because:
1) It closely ties with the flow and interface presented by the GUI.
2)Highly relies on the state, objects, circumstances on which script been recorded.
3) input information gets Hardcoded, so when those infos are no longer valid then you need to update the script with latest value.

Please let me know if you have any other relevant doubts.

Thanks,
Nilanjan.


RE: Is it possible to automate without recording - LalithaAkila - 01-08-2013

Hi nilanjans,

Thanks for your reply.

Can you explain me how to do that without recording.

Thanks iin advance.


RE: Is it possible to automate without recording - harishshenoy - 01-08-2013

Hi ,

First add the required object to the object repository.
Ex: If you want to automate 'Login' functionality of the GMAIL page.
1. Add 'Username' , 'password' textboxes and 'LogIn' button into the object repository.
2. Then in the expert view type (While typing itself QTP suggest you the added object)
Ex:
Code:
Browser("Name that is added").page("Page name").webedit("Username").set "
Set the user name which u want"

Similary for the Password text box , then to'click the LOGIN button' ,

Code:
Browser("Name that is added").page("Page name").webbutton("login").click



Like this you can write the code which you wanted , usually while developing script we wont used 'record and playback' , mostly people write thier own code than using the record and playback.

Thanks,
Harish SHenoy


RE: Is it possible to automate without recording - Ankesh - 01-08-2013

Well, i dont see any issue with record and playback. You can always record your script and parameterize/modify them for reusability. Recording will automatically add objects to OR thus saving the extra time spent on adding object to OR manually.