Re: Query - Descriptive Programming

102 views
Skip to first unread message
Message has been deleted

Ganesh muralidharan

unread,
Jul 31, 2008, 6:24:15 AM7/31/08
to Mercu...@googlegroups.com, raheel...@gmail.com
Try title for page :

Browser("name:=MM").Page("
title:=MM").WebEdit("name:=Subject").Set "Done"


On Thu, Jul 31, 2008 at 3:47 PM, Raheel Sheikh <raheel...@gmail.com> wrote:
When i recorded the test, i got the following script

Browser("MM").Page("MM").WebEdit("_idJsp0:_idJsp63").Set "Done"

When i tried descriptive programming, i did the following

Browser("name:=MM").Page("name:=MM").WebEdit("name:=Subject").Set "Done"

I got the follwoing error message
Cannot find the "[ WebEdit ]" object's parent "[ Page ]" (class Page). Verify that parent properties match an object currently displayed in your application.


Can someone clear me what is going wrong?







--
Ganesh Muralidharan
Wipro Technologies
Mob. : 9341023574

'God Never Forgets'

Naveen

unread,
Jul 31, 2008, 6:49:38 AM7/31/08
to QTP - HP Quick Test Professional - Automated Software Testing
Hi Raheel,

Try this snippet::

Set Desc_WebEdit = Description.Create()
'Set some selective properties
Desc_Link("name").Value = "_idJsp0:_idJsp63"
Browser("MM").Page("MM").WebEdit("_idJsp0:_idJsp63").Set "Done"

Use Object Spy and identify the object which has name =
_idJsp0:_idJsp63. Some times it name might change in the application.

Thanks
Naveen Kumar N

Ganesh muralidharan

unread,
Jul 31, 2008, 8:32:02 AM7/31/08
to Mercu...@googlegroups.com
r u sure the page details r correct?
Message has been deleted

Roman Zilber

unread,
Jul 31, 2008, 12:22:14 PM7/31/08
to Mercu...@googlegroups.com
When you add the objects Page to Object Repository, do you have exactly only one attribute "name"? I think it should be "title"

Try to debug it in this way

print Browser("name:=MM").Page("name:=MM").Exist
print Browser("name:=MM").Page("title:=MM").Exist
print Browser("name:=MM").Page("url:=*.*").Exist
print Browser("name:=MM").Page("name:=MM").WebEdit("name:=Subject").Exist




On Thu, Jul 31, 2008 at 11:25 AM, Raheel Sheikh <raheel...@gmail.com> wrote:
Actually, i was reading descriptive programming and its advantages, that is why i have posted the question.
 
I don't need any workaround. I want to know what is wrong with the statement.
 
Browser("name:=MM").Page("name:=MM").WebEdit("name:=Subject").Set "Done"
 
The browser title is MM
The page title is MM
and the text field name is Subject
Message has been deleted

Mathi_QA Engineer

unread,
Aug 1, 2008, 4:41:21 AM8/1/08
to QTP - HP Quick Test Professional - Automated Software Testing
Hi,
sometimes QTP doesnot identify the objects, in DP. I
guess you can give someother property also for WinEdit
for exapmle,
Browser("name:=MM").Page("title:=MM").WebEdit("name:=Subject","class_index:=6").Set

just try this way...

On Aug 1, 10:31 am, "Raheel Sheikh" <raheel.she...@gmail.com> wrote:
> HI Roman,
>
> The following returned true
>
> print Browser("name:=MM").Page("title:=MM").Exist
>
> but the following returned false
>
> print Browser("name:=MM").Page("title:=MM").WebEdit("name:=Subject").Exist
>
> Looks like there is problem in WebEdit now. I have attached screenshot for
> the page where this subject field reside.
>
>
>
> On Thu, Jul 31, 2008 at 9:22 PM, Roman Zilber <rzil...@gmail.com> wrote:
> > When you add the objects Page to Object Repository, do you have exactly
> > only one attribute "name"? I think it should be "title"
>
> > Try to debug it in this way
>
> > print Browser("name:=MM").Page("name:=MM").Exist
> > print Browser("name:=MM").Page("title:=MM").Exist
> > print Browser("name:=MM").Page("url:=*.*").Exist
> > print Browser("name:=MM").Page("name:=MM").WebEdit("name:=Subject").Exist
>
> > On Thu, Jul 31, 2008 at 11:25 AM, Raheel Sheikh <raheel.she...@gmail.com>wrote:
>
> >> Actually, i was reading descriptive programming and its advantages, that
> >> is why i have posted the question.
>
> >> I don't need any workaround. I want to know what is wrong with the
> >> statement.
>
> >> Browser("name:=MM").Page("name:=MM").WebEdit("name:=Subject").Set "Done"
>
> >> The browser title is MM
> >> The page title is MM
> >> and the text field name is Subject
>
> >> On 7/31/08, Naveen <catchnaveen.psgt...@gmail.com> wrote:
>
> >>> Hi Raheel,
>
> >>> Try this snippet::
>
> >>> Set Desc_WebEdit = Description.Create()
> >>>                                'Set some selective properties
> >>> Desc_Link("name").Value = "_idJsp0:_idJsp63"
> >>> Browser("MM").Page("MM").WebEdit("_idJsp0:_idJsp63").Set "Done"
>
> >>> Use Object Spy and identify the object which has name =
> >>> _idJsp0:_idJsp63. Some times it name might change in the application.
>
> >>> Thanks
> >>> Naveen Kumar N
>
> >>> On Jul 31, 3:17 pm, "Raheel Sheikh" <raheel.she...@gmail.com> wrote:
> >>> > When i recorded the test, i got the following script
>
> >>> > Browser("MM").Page("MM").WebEdit("_idJsp0:_idJsp63").Set "Done"
>
> >>> > When i tried descriptive programming, i did the following
>
> >>> > Browser("name:=MM").Page("name:=MM").WebEdit("name:=Subject").Set
> >>> "Done"
>
> >>> > I got the follwoing error message
> >>> > Cannot find the "[ WebEdit ]" object's parent "[ Page ]" (class Page).
> >>> > Verify that parent properties match an object currently displayed in
> >>> your
> >>> > application.
>
> >>> > Can someone clear me what is going wrong?
>
>
>
>  screen1.JPG
> 28KViewDownload- Hide quoted text -
>
> - Show quoted text -
Message has been deleted

Mathi_QA Engineer

unread,
Aug 1, 2008, 5:50:41 AM8/1/08
to QTP - HP Quick Test Professional - Automated Software Testing
But in your error it shows,
QTP doesnot identify the parent Page only right...
Cannot find the "[ WebEdit ]" object's parent "[ Page ]" (class
Page).
Verify that parent properties match an object currently displayed in
your
application.
but u have asked for edit..
did u checked for page well?




On Aug 1, 2:08 pm, "Raheel Sheikh" <raheel.she...@gmail.com> wrote:
> It didn't work as well.
>
> Thanks anyway.
> > > - Show quoted text -- Hide quoted text -

Ganesh muralidharan

unread,
Aug 1, 2008, 5:52:44 AM8/1/08
to Mercu...@googlegroups.com
Hey Raheel,

The issue has been resolved right?

Regards,
Ganesh
Message has been deleted

Ganesh muralidharan

unread,
Aug 1, 2008, 6:01:10 AM8/1/08
to Mercu...@googlegroups.com
with page micclass it was working na?

On Fri, Aug 1, 2008 at 3:25 PM, Raheel Sheikh <raheel...@gmail.com> wrote:
Yes. i checked for page. The page is correct.
Message has been deleted

Roman Zilber

unread,
Aug 1, 2008, 9:24:32 AM8/1/08
to Mercu...@googlegroups.com
You can try to use "index:=3". But if you want to learn how to handle this type of situations, the next step of debugging would be:

1. Add "Subject" to Obj. Repository
2. Change the "name" regular expression
3. Check if the object can be found on the Page
4. Repair it, if you need
5. Repeat from step 3, until it works

6. Think if you really need to use descriptive programming in such case. :)


On Fri, Aug 1, 2008 at 1:31 AM, Raheel Sheikh <raheel...@gmail.com> wrote:
HI Roman,

The following returned true
print Browser("name:=MM").Page("title:=MM").Exist

but the following returned false

print Browser("name:=MM").Page("title:=MM").WebEdit("name:=Subject").Exist


Looks like there is problem in WebEdit now. I have attached screenshot for the page where this subject field reside.

Roman Zilber

unread,
Aug 1, 2008, 9:25:47 AM8/1/08
to Mercu...@googlegroups.com
class_index it's for java objects, it should be "index".
Reply all
Reply to author
Forward
Message has been deleted
0 new messages