Re: Query regarding Descriptive Programming - Dmitry BLOG

47 views
Skip to first unread message
Message has been deleted

Dmitry Motevich

unread,
Aug 20, 2008, 7:28:05 AM8/20/08
to Mercu...@googlegroups.com
Raheel,
What is your question?


On Wed, Aug 20, 2008 at 3:26 PM, Raheel Sheikh <raheel...@gmail.com> wrote:
I was going through the example on the following page

http://motevich.blogspot.com/2008/08/qtp-descriptive-programming-operations_13.html

There was an error running the test while executing the following code on Line3 which is a General Run Error

Set Desc = Description.Create()
Desc("micClass").Value = "WebEdit"
Set Links = Browser("Google Sets").Page("Google Sets").ChildObjects(Desc)

MsgBox "Number of Edits: " & Links.Count

P.S: I added the Browser in the OR.
The same error message was generated even with the following change in line3
Set Links = Browser("name:=Google Sets").Page("title:=Google Sets").ChildObjects(Desc)










--
Dmitry Motevich,
http://motevich.blogspot.com
Message has been deleted

Dmitry Motevich

unread,
Aug 20, 2008, 7:38:11 AM8/20/08
to Mercu...@googlegroups.com
I've got your message that "A general error is occuring.".
But what is you QUESTION?

How can we help you if we don't know what you need?

I can suggest several possible questions for "A general error is occuring.":
  • How to fix it?
  • Is it correct behavior?
  • Is it dangerous for my health? :)
  • Should I open the window and close the door? :)
  • etc


On Wed, Aug 20, 2008 at 3:29 PM, Raheel Sheikh <raheel...@gmail.com> wrote:
A general error is occuring. That is the question.
Message has been deleted

Dmitry Motevich

unread,
Aug 20, 2008, 8:03:52 AM8/20/08
to Mercu...@googlegroups.com
I have several guesses:
  1. You didn't add Page("Google Sets") into your OR
  2. There are several (> 1) opened browsers
  3. There are not opened browsers
  4. Your QTP test launches Win application instead of Web browser

Advices:
  1. Verify that browser exists:
    Browser("Google Sets").Exist
  2. Verify that page exists:
    Browser("Google Sets").Page("Google Sets").Exist
  3. Try *record* new scripts on Google Sets


On Wed, Aug 20, 2008 at 3:49 PM, Raheel Sheikh <raheel...@gmail.com> wrote:
I went through your example, posted at your BLOG, to see the results.

A general error message occured at Line3.

I am asking why is this general error occuring and how can i fix it?

Despite the fact that i added the browser object in OR as well.
I hope i am clear this time.I have added an attachment as well.

Regards
Message has been deleted

Dmitry Motevich

unread,
Aug 21, 2008, 1:40:21 AM8/21/08
to Mercu...@googlegroups.com
I see...

Raheel, Could you try to record new script with these steps:
  1. Open Google Sets pages
  2. Set any text to first edit box
So, QTP script will look like:
Browser("Google Sets").Page("Google Sets").WebEdit("q1").Set("1111111")

Does this script work correctly?


On Thu, Aug 21, 2008 at 7:57 AM, Raheel Sheikh <raheel...@gmail.com> wrote:
From what you have guessed is not true

1.I have Browser("Google Sets").Page("Google Sets") in OR
2.There is only one IE opened browser
3.There is an opened browser
4.Browser is already opened so there is no launching

From what you have advised:

1.The Browser("Google Sets").Exist is true
2. Browser("Google Sets").Page("Google Sets").Exist is true
3.I have tried recording new scripts and still the same error message

I am still getting the same error message
Message has been deleted

Dmitry Motevich

unread,
Aug 22, 2008, 2:18:49 AM8/22/08
to Mercu...@googlegroups.com
Raheel,

Is your environment correct? I mean versions of: OS, QTP, IE.
If they are OK, then I can recommend to reinstall QTP.

If this does not help, then it seems it will be time to contact HP Support team.


On Thu, Aug 21, 2008 at 10:42 AM, Raheel Sheikh <raheel...@gmail.com> wrote:
Yes. This works correctly.
Message has been deleted

Dmitry Motevich

unread,
Aug 22, 2008, 2:39:24 AM8/22/08
to Mercu...@googlegroups.com
I executed the mentioned test on IE 7.
Could you check it (maybe on other computer)?


On Fri, Aug 22, 2008 at 10:36 AM, Raheel Sheikh <raheel...@gmail.com> wrote:
I think my environment and version of OS, QTP are correct. The IE version is 6.0

My all other tests are working fine.

Looks like I can't run the test then.... Sigh

Thanks for the guidance anyway..

Regards

Vivek Prakash

unread,
Aug 22, 2008, 2:42:16 AM8/22/08
to Mercu...@googlegroups.com
Dmitry, it seems the three line code what you mentioned earlier will only work with subroutine.
I cant comment more on this but when I tried with Subroutine, it works fine (but, could not capture the output).
Without subroutine (Sub .. End Sub), its giving general Error.
 
Regards,
Vivek

 
On 8/22/08, Raheel Sheikh <raheel...@gmail.com> wrote:
I think my environment and version of OS, QTP are correct. The IE version is 6.0

My all other tests are working fine.

Looks like I can't run the test then.... Sigh

Thanks for the guidance anyway..

Regards
Reply all
Reply to author
Forward
0 new messages