[LDTP-Dev] How to access toolbar's button on cobra(ldtp for windows)

wangyubin wangyubin at cn.fujitsu.com
Mon May 28 19:14:26 PDT 2012


Hi, Nagappan

I want to use cobra to create my automatic test cases.
but I found there is no APIs to access toolbar.

please help me how to access the icon button which is in the toolbar.

my code :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
getobjectlist("frmMainWindow")
# result ["tbar0", "tbar1".......]

getchild("frmMainWindow", "tbar0")
# result ["btn1", "btn0", "btn2"......]

getchild("frmMainWindow", "tbar1")
# result ["btn2", "btn3", "btn0"......]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
when I try to access "btn0", "btn1" and so on,  an Exception will pop up.

my code :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
getobjectinfo("frmMainWindow", btn1)
Exception: Unable to find Object info: btn1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks
wang yubin
--------------------------------------------------
wang yubin
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
No. 6 Wenzhu Road, Nanjing, 210012, China
TEL:+86-25-86630566-8516
FUJITSU INTERNAL:7998-8551
FAX:+86+25-83317685
EMail:wangyubin at cn.fujitsu.com
-------------------------------------------------- 




More information about the LDTP-dev mailing list