07-16-2011, 12:51 AM
Thank you rajpes for your reply.
I think I need to clarify further.
I use the followong code to define and set The Browser and Page Objects for my test as the first few lines for my test.
If I move the last 2 lines ABOVE the Browser and Page Descriptions QTP displays an "unknown" error stepping thru the begining of the script.
If I leave the 2 lines where BELOW the descriptions [as written above] the 2 variables are correctly identified and everything in the scripts runs fine.
I use a single object repository that contains 2 objects [ Windows Internet Explorer & Internet Explorer_Server ] I captured using a low level recording.
This enables me to type random strings I generate into ajax grids on the page. This all works fine for 10 actions in the test.
What I am attempting to do is remove my dependence on the small repository that I am using to type random strings.
I wish to make the code transportable through a rather large set of modules within the application.
My initial thought was that if I followed what I have been using successfully I could do the same for these other two objects.
Hence I came up with the code I originally posted. I do have my web add-in loaded.
Does this clarify things - suggestion[s]?
Thank you - mrerek
I think I need to clarify further.
I use the followong code to define and set The Browser and Page Objects for my test as the first few lines for my test.
Code:
' Browser Description ====================
Set ObjBrw = Nothing
Set ObjBrw = Description.Create
ObjBrw("name").Value = BrwHandle
'Page Description ====================
Set objPge = Nothing
Set ObjPge = Description.Create()
ObjPge("title").value = PgeHandle
BrwHandle = Browser(ObjBrw).GetROProperty("name")
PgeHandle = Browser(ObjBrw).Page(ObjPge).GetROProperty("title")
If I move the last 2 lines ABOVE the Browser and Page Descriptions QTP displays an "unknown" error stepping thru the begining of the script.
If I leave the 2 lines where BELOW the descriptions [as written above] the 2 variables are correctly identified and everything in the scripts runs fine.
I use a single object repository that contains 2 objects [ Windows Internet Explorer & Internet Explorer_Server ] I captured using a low level recording.
This enables me to type random strings I generate into ajax grids on the page. This all works fine for 10 actions in the test.
What I am attempting to do is remove my dependence on the small repository that I am using to type random strings.
I wish to make the code transportable through a rather large set of modules within the application.
My initial thought was that if I followed what I have been using successfully I could do the same for these other two objects.
Hence I came up with the code I originally posted. I do have my web add-in loaded.
Does this clarify things - suggestion[s]?
Thank you - mrerek