The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> IBM/Rational Robot

Pages: 1
rrobot
Member


Reged: 02/29/08
Posts: 85
Script Command Failure- Disable menu item
      #582888 - 07/29/09 07:35 AM

Hi,
I am testing a windows based application where in when I click a button a popupmenu shows up.Popupmenu has different number of items and which may be active or diabled. What I am trying to do is loop through the menu items by clicking each one till I get to the active one..I know that I got to an active one when the window status changes.But what is happening is, when disabled menu item is clicked, it is causing a script command failure..It continues execution but gives a failure in the log at the end of playback. Any ideas/suggestions will be appreciated.
For x=1 to 10
If Status<>"DI" then
SQAConsolewrite"The value of x is"&x
menuitem="pos("& x &")"
SQAConsolewrite"menu="&menuitem
'Window SetContext, "Caption={XXX*}", ""
PushButton Click, "Text=DI"
PopupMenuSelect "menu="&menuitem
PopupMenuSelect ""
delayfor(5000)
Else
Exit For
End If
Window SetContext, "Caption={XXX*}", ""
SQAGetProperty "\;Type=Window;Caption=XXX*};\;Type=EditBox;ObjectIndex=13","Text",Status
SQAConsolewrite Status
Next x

thanks in advance.


Post Extras: Print Post   Remind Me!   Notify Moderator  
507073
Junior Member


Reged: 08/27/04
Posts: 161
Loc: Rochester, NY
Re: Script Command Failure- Disable menu item [Re: rrobot]
      #583106 - 07/30/09 05:56 AM

rrobot,
searching yourself can often be faster than asking someone to look for you.
Re: Handling Script Command Failures

Phil


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 4 anonymous users are browsing this forum.

Moderator:  AJ, RSBarber 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 1691

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5