Problem with ToolStripGetItemState
Posted: Wed Oct 31, 2007 1:30 am
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?
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?