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

Nagappan Alagappan nagappan at gmail.com
Mon May 28 20:10:28 PDT 2012


Hi Wang,

You are the first customer to use Cobra outside VMware ;-) (atleast I know)

Can you please provide me a generic app with which I can reproduce this bug
?

Thanks
Nagappan

On Mon, May 28, 2012 at 7:14 PM, wangyubin <wangyubin at cn.fujitsu.com> wrote:

> 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
> --------------------------------------------------
>
>
>


-- 
Linux Desktop (GUI Application) Testing Project -
http://ldtp.freedesktop.org
Cobra - Windows GUI Automation tool - https://github.com/ldtp/cobra
http://nagappanal.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/ldtp-dev/attachments/20120528/5a41e324/attachment.htm>


More information about the LDTP-dev mailing list