1

There is a toolbar in the java application with buttons: ..., security, tools, login, logout.

java toolbar

UFT object spy can reach down to a certain button, but in script (descriptive programming) UFT can only see JavaToolbar.

nowYouSeeMe = JavaWindow("label:=WinTitle").JavaToolbar("attached text:=ToolbarName").Exist(0)    'True
nowYouDoN_t = JavaWindow("label:=WinTitle").JavaToolbar("attached text:=ToolbarName").JavaButton("label:=logout").Exist(0)    'False

So I can not get property, e.g. enabled, of a certain button. Just can press it like:

JavaWindow("label:=WinTitle").JavaToolbar("attached text:=ToolbarName").Press "logout"

Is there any possibility to get property of a button? (Guess it should be the same like in JavaMenu, get property of menu item)

1

GetItemProperty([item], [property]) method is used to check property of JavaToolbar item. E.g.:

enabledProp = JavaWindow("label:=WinTitle").JavaToolbar("attached text:=ToolbarName").GetItemProperty("logout", "enabled")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.