Micro Focus QTP (UFT) Forums
Unable to run the scripts in QTP 10 - 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: Unable to run the scripts in QTP 10 (/Thread-Unable-to-run-the-scripts-in-QTP-10)

Pages: 1 2


Unable to run the scripts in QTP 10 - Payal Sharma - 05-20-2012

Sad Hi,

I am a beginner in QTP and already I have posted questions in this forum that how to write scripts in QTP in Expert View. But up till now I am getting the same error messages and I am not able to run the scripts as I am facing the same error messages.

I know I am a newbie in this QTP and I am trying to learn by heart but not sure why it not running the scripts and constantly giving the error mesages?

Please help me to understand!

Regards,

Payal




RE: Unable to run the scripts in QTP 10 - sshukla12 - 05-21-2012

Hi,

Please post the error message and related screen shot.

Regards,
Sankalp


RE: Unable to run the scripts in QTP 10 - Payal Sharma - 05-21-2012

Hi,

Here is is the error message:

" The test run cannot continue due to an unrecoverable error.

Cannot identify the object "Login" (of class Dialog). Verify that this object's properties match an object currently displayed in your application.

Line (1): "With Dialog("Login")". "

Not sure, why "With" is coming in the beginning??

Regards,

Payal

[attachment=992][quote='sshukla12' pid='21101' dateline='1337573889']


RE: Unable to run the scripts in QTP 10 - ravi.gajul - 05-21-2012

Hi,
Please make sure that the object "dialog" is available in the repository.copy pasting the code will not work with qtp unless we have all the objects in the repository.
The following code
Code:
With Dialog("Login")
    .Activate
    .WinEdit("Agent Name:").Set "nisha"
    .WinEdit("Agent Name:").Type  micTab
    .WinEdit("Password:").SetSecure "4fb9c587cc4d77b45a24542b5db06399cf49cc89"
    .WinEdit("Password:").Type  micReturn
End With
is equivalent to
Code:
    Dialog("Login").Activate
    Dialog("Login").WinEdit("Agent Name:").Set "nisha"
    Dialog("Login").WinEdit("Agent Name:").Type  micTab
    Dialog("Login").WinEdit("Password:").SetSecure "4fb9c587cc4d77b45a24542b5db06399cf49cc89"
    Dialog("Login").WinEdit("Password:").Type  micReturn
that explains "with"

Regards,
Ravi


RE: Unable to run the scripts in QTP 10 - Payal Sharma - 05-21-2012

Hi,

Thanks for the reply..but I am a newbie so how to add the object "Dialog" in the repository?

Regards,

Payal


RE: Unable to run the scripts in QTP 10 - sshukla12 - 05-22-2012

Hi,

Go to object repository->add objects-> click on the dialog box.

Regards,
Sankalp


RE: Unable to run the scripts in QTP 10 - Payal Sharma - 05-22-2012

Hi Sankalp,

I am trying everything to get the scripts correctly done but I am not able to do that. Attaching the error scripts. Hope it helps!! I am trying to hard to get these scripts writing in Expert View in QTP 10 but not sure why this error is keep on coming.

Please help!!

Regards,
Payal

[attachment=994][quote='sshukla12' pid='21135' dateline='1337658943']


RE: Unable to run the scripts in QTP 10 - ravi.gajul - 05-22-2012

Hi,

As sankalp wrote, please add all the objects to the repository not just the dialog box.This time "agent name" object is missing.Now you will have to go and add all these objects to repository for your script to work
1) Dialog("Login") 'this is the main window of flight app
2)WinEdit("Agent Name:") 'this is an edit box for user id
3)WinEdit("Password:") ' this is the password field in the main window

Regards,
Ravi


RE: Unable to run the scripts in QTP 10 - Payal Sharma - 05-22-2012

Hi Ravi,

First of all thanks a lot! but I feel sorry for myself that I am not able to run the scripts after following Sankalp's advice and as well as your advice as well. Not sure the same error message is coming.

I know I am a beginner and I am in the learning phase but feel bad equally for myself that I am not able to do that but I am keep on trying.

Is it possible if you can write the steps? And one thing, I am thinking about Add-Ins as well? Do they have any role to perform these actions?

Please advice and guide me!

Regards,
Payal


RE: Unable to run the scripts in QTP 10 - sshukla12 - 05-22-2012

Hi,
Are u able to add objects in object repository?
just go head with default add-ins now.

Regards,
Sankalp