Hi Hong,
zhang Hong wrote:
> The documentation for "Statusbar" in OOo_testtool.pdf I have read,but there
> is no method to
> judge the language status bar control if disabled or not.Because in the
> testcase specification,
> there is a step as following:
>
> Verify that language status bar control is disabled
>
> I want to know how to judge it?I have tried the method "Bool
> Object.IsEnabled",it doesn't work.
> I can use the method :
> String DocumentWindow.StatusGetText[ ItemID ]
> to return the text which displays on the control.If there is no display on
> language status bar control ,
> Can I think it disabled?
We have 2 situtations here that can be tested:
1. Is String DocumentWindow.StatusGetText[ ItemID ] > ""
and
2. Is entry disabled
As Stefan Baltzer wrote in a former mail, normally the menu shouldn't
come up if the entry is disabled. That would be the way to check if
entry is disabled. I think this could work:
try
DocumentWindow.OpenContextMenu
catch
printlog "Entry is disabled"
end catch
But it is a little bit tricky, because you have to move the mouse there
before opening context menu. Play around with it :-)
Best Regards
Helge
--
===============================================================
Sun Microsystems GmbH Helge Delfs
Nagelsweg 55 Quality Assurance Engineer
20097 Hamburg OOo Team Lead Automation
http://qa.openoffice.org mailto:[EMAIL PROTECTED]
http://wiki.services.openoffice.org/wiki/User:Hde
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]