i have the same issue but my object is a weblist. There are 5 weblists, 
which get enabled after the first one is selected.
I tried the refresh method and didnot work.

example:

.WebList("name:=dataElementForm\.population").Select "Pediatric"
.WebList("name:=dataElementForm\.diseaseList").Select "Astma"

'after selecting the disease list Astma, page refreshes and I next object 
"domain" is not found

.WebList("name:=dataElementForm.domain").Select "domain"
.WebList("name:=dataElementForm\.subdomain").Select 3
.WebList("name:=dataElementForm\.classificationElementList").Select 1

.WebButton("name:=Continue").Click


help would be appreciated....

On Monday, August 12, 2013 12:45:12 PM UTC-4, udayanem wrote:
>
> Yes, You are right Vikas.
>
> As RefreshObject is documented method for most of the object classes, I 
> prefer using RefreshObject.
>
> But either RefreshObject or Init have the same results.
>
> Thanks,
> Uday
> QTP \ UFT Videos <https://www.youtube.com/user/AnemUday/videos>
>
> On Monday, 12 August 2013 10:26:34 UTC+5:30, Vikas wrote:
>>
>> Udayanem,
>>
>> Yes, you are right. Its working fine for web object. There is another 
>> method which can be used for web objects:
>>
>> *"init"*
>> *For ex:*
>> btn_Search.Init 
>>
>> This method reload the web objects even after page is refreshed. This is 
>> an undocumented method of QTP, but it works perfectly in this scenario.
>>
>> Thanks for your reply.
>>
>> Regards
>> Vikas
>>
>>
>> On Sun, Aug 11, 2013 at 12:13 AM, udayanem <[email protected]> wrote:
>>
>>> Vikas,
>>>
>>> Use RefreshObject before clicking *btn_Search* second time
>>>
>>>
>>> btn_Search .Click
>>> Msgbox "btn_Search Clicked"
>>> btn_NewSearch.Click
>>> *btn_Search.RefreshObject*
>>> *btn_Search.Click*
>>>
>>> The reason being, at the time of initialization *btn_Search *it holds 
>>> some properties. After clicking the button, the page may refresh. Even 
>>> though the same object identification properties are used, we should 
>>> refresh the object, so that it will work smooth.
>>>
>>> Please let us know whether the above solves your problem.
>>>
>>> Thanks,
>>> Uday
>>> QTP \ UFT Videos <https://www.youtube.com/user/AnemUday/videos>
>>>
>>> On Friday, 9 August 2013 11:15:49 UTC+5:30, Vikas wrote:
>>>>
>>>> Hi,
>>>>
>>>> I am facing an issue regarding the Web Objects in QTP. I am using QTP 
>>>> 11.0 with IE9 browser.
>>>>
>>>> Test Code:
>>>> '****  Start of Code ********
>>>>  Dim btn_web
>>>> Set btn_Search = Browser("Google").Page("Google").Frame("Content").
>>>> WebButton("Search")
>>>> Set btn_NewSearch = 
>>>> Browser("Google").Page("Google").Frame("Content").WebButton("New 
>>>> Search")
>>>>
>>>> btn_Search .Click
>>>> Msgbox "btn_Search Clicked"
>>>> btn_NewSearch.Click
>>>> *btn_Search.Click*
>>>>
>>>> '****  End of Code ********
>>>>
>>>> In aobve code, the code in Red font is always giving me error that 
>>>> "Cannot identify object of class webbutton". But the same button is 
>>>> getting 
>>>> clicked 1st time, but not the 2nd time. These objects are present at the 
>>>> same page. Please provide me a solution, How can I declare a web object 
>>>> and 
>>>> should use it multiple time in the code? 
>>>>
>>>> Regards
>>>> Vikas Goyal
>>>>
>>>  -- 
>>> -- 
>>> You received this message because you are subscribed to the Google
>>> "QTP - HP Quick Test Professional - Automated Software Testing"
>>> group.
>>> To post to this group, send email to [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]
>>> For more options, visit this group at
>>> http://groups.google.com/group/MercuryQTP?hl=en
>>>  
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "QTP - HP Quick Test Professional - Automated Software Testing" 
>>> group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>

-- 
-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

--- 
You received this message because you are subscribed to the Google Groups "QTP 
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to