Ranorex

Problem with ToolStripGetItemState

 
Post new topic   Reply to topic    Ranorex Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
PyDave



Joined: 31 Oct 2007
Posts: 1

PostPosted: Wed Oct 31, 2007 2:30 am    Post subject: Problem with ToolStripGetItemState
I am evaluating RanorexPro with Python 2.5.1. I have a .Net application that has a single toolbar. I can identify the toolbar:

menubar = Ranorex.FormFindChildControlName(lit, 'm_oToolBar')

Read the number of items:
MBItemCount = Ranorex.ToolStripGetItemCount(menubar)

Iterate through them and print their names:

for i in range(1, MBItemCount + 1):
print Ranorex.ToolStripGetItemText(menubar, i)

But when I try to get their state:

for i in range(1, MBItemCount + 1):
print Ranorex.ToolStripGetItemText(menubar, i)
print Ranorex.ToolStripGetItemState(menubar, i)

I get the following error:

New Client (The name of the first button)
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
AttributeError: 'module' object has no attribute 'ToolStripGetItemState'

Is this an error in the Python library, or am I doing something wrong?
Back to top
View user's profile Send private message
Support Team
Site Admin


Joined: 07 Jul 2006
Posts: 344

PostPosted: Wed Oct 31, 2007 12:58 pm    Post subject:
Quote:
Is this an error in the Python library?

Yes, this is a bug in V1.2.
We have fixed the bug in the V1.3, this new version will be released at the 31. October 2007.

You can use the following workaround:
Find the menu Element with the ElementFindChild function and read the item state with ElementGetState.

Jenö
Ranorex Support Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> Bug Reports All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum