hi instead of all this..u can write a generic function to wait until the particular webelement is displayed or not...try this
Write a do loop with counter and in that check for the existence of the webelement..if found then it will do the operation..or else..u can write some code to reopen the particular popup or exit from the test Thanks, Sreedhar On Tue, Dec 22, 2009 at 12:28 AM, Bibek Khatiwara <[email protected]>wrote: > Diam.. > You need to follow following steps to define recovery scenario for your > object state: > > Resources(menu)>>Recovery scenario manager>>New>>New Scenario>>Next>>object > state>>Point your object(i.e pop up dialog/window ..it'll be better if you > point to the dropdown list/combo box) with hand pointer>>Then select an > appropriate recovery scenario & post recovery operation from the available > options out there.. > > > If you want to add recovery scenario directly after the above stated line > then following is the partial statement: > > .Add "C:\Recovery.qrs", "ErrMessage", 1 > (code will be lengthy if you want to call RS from your script..kindly have > a try once) > > > > > On Mon, Dec 21, 2009 at 3:10 PM, Daim Phillips <[email protected]> wrote: > >> This is just to report an error, on alternative scenario. I need to call >> recovery scenario. suppose, the following is executed, >> >> Reporter.ReportEvent micFail,"Pop-up Object:","Object cannot be found" >> >> Then, how will you call the recovery scenario. >> >> >> On Fri, Dec 18, 2009 at 4:15 PM, Bibek Khatiwara <[email protected] >> > wrote: >> >>> Hi Diam! Kindly check with the following: >>> '============================================= >>> >>> set B = Browser("").Page("") >>> >>> B.WebButton("name:=Check", "index:=5").click >>> >>> Browser("micclass:=Browser","Creation time:=1").Sync >>> >>> Wait(3) >>> >>> If Not Browser("micclass:=Browser","Creation time:=1").Exist Then >>> >>> Reporter.ReportEvent micFail,"Pop-up Object:","Object cannot be found" >>> >>> Else >>> >>> >>> B.WebElement("innerhtml:=Apple", "innertext:=Apple").click >>> >>> End If >>> '=================================================== >>> >>> >>> On Fri, Dec 18, 2009 at 11:46 AM, Daim <[email protected]> wrote: >>> >>>> Wait(3) doesn't work as well. It sometimes keeps on loading and >>>> doesn't load at all, and sometimes loads atonce. >>>> >>>> The error message is displayed >>>> >>>> Cannot identify the object "[ WebElement ]" (of class WebElement). >>>> Verify that this object's properties match an object currently >>>> displayed in your application. >>>> >>>> >>>> set B = Browser("").Page("") >>>> >>>> B.WebButton("name:=Check", "index:=5").click >>>> >>>> 'on this button click, a window opens displaying list. This list >>>> sometimes doesn't populates and shows nothing, that is why the next >>>> line wait(3) was applied. >>>> >>>> wait(3) >>>> >>>> B.WebElement("innerhtml:=Apple", "innertext:=Apple").click >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Dec 16, 3:17 pm, Bibek Khatiwara <[email protected]> wrote: >>>> > Hi mebo! >>>> > Could u plz let us know the followings: >>>> > 1.R u using DP or Record/playback? >>>> > 2.Is the pop up is dialog box? >>>> > >>>> > If no 2 then use: Dialog("micclass:=Dialog").Type micEsc for >>>> closing it >>>> > . >>>> > otherwise use Wait eg:Wait(3) till dialog box is loaded. >>>> > >>>> > do let us know if u r using Record/playback.. >>>> > >>>> > >>>> > >>>> > On Wed, Dec 16, 2009 at 2:41 PM, mabobine <[email protected]> >>>> wrote: >>>> > > Hi, >>>> > >>>> > > I have 3 Actions >>>> > >>>> > > Action 1 calls Action 2 and Action 3 >>>> > >>>> > > There is a button on Action 2, that displays a pop-up and displays >>>> > > list of users. >>>> > >>>> > > The problem is that sometimes, the pop-up displays empty list of >>>> > > users, despite there are users in it. Because of that, the test >>>> fails, >>>> > > as it is not able to find the user in it. This is not a programming >>>> > > error, but I don't know why >>>> > >>>> > > For that, I am trying to use recovery scenario, which will close >>>> that >>>> > > pop-up and open that pop-up again. >>>> > >>>> > > To what I understand, a recovery scenario is automatically called on >>>> > > Trigger Event generation >>>> > >>>> > > I have tried the following but it doesn't call the Recovery scenario >>>> > > automatically. >>>> > >>>> > > 1. Object State : Where I clicked the empty list and then provided >>>> > > post recovery >>>> > > 2. Test Run Error : Object Not Found >>>> > > 3. Test Run Error : Object Not Visible >>>> > >>>> > > Is there anything I am missing. >>>> > >>>> > > -- >>>> > > 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]<mercuryqtp%[email protected]> >>>> <mercuryqtp%[email protected]<mercuryqtp%[email protected]> >>>> > >>>> > > For more options, visit this group at >>>> > >http://groups.google.com/group/MercuryQTP?hl=en >>>> > >>>> > -- >>>> > Regards, >>>> > Bibek >>>> >>>> -- >>>> 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]<mercuryqtp%[email protected]> >>>> For more options, visit this group at >>>> http://groups.google.com/group/MercuryQTP?hl=en >>>> >>> >>> >>> >>> -- >>> Regards, >>> Bibek >>> >>> -- >>> 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]<mercuryqtp%[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 >> "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]<mercuryqtp%[email protected]> >> For more options, visit this group at >> http://groups.google.com/group/MercuryQTP?hl=en >> > > > > -- > Regards, > Bibek > > -- > 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]<mercuryqtp%[email protected]> > For more options, visit this group at > http://groups.google.com/group/MercuryQTP?hl=en > -- Mallipeddi Sreedhar 215-688-2456 -- 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
