Hi all,


This script (generatemap.py) intends to help new staff how to recognize
the control and use it for testing.

For newbie on LDTP, they usually dont know whatever the control should
be used in their script. after use this way which 
generated by generatemap.py script, Hope this way will helpful.

That script applies to setup their parameters that has need a tag
control in API, if any control is changed, just revise
the tag in that generated script, I think this way should be easy
maintained in automation test.


Script Usuags:
        python generatemap.py *gedit framegedit.py


The output format of framegedit.py (see attachment)
------------------------------------------------------------------------
-----------
#!/usr/bin/python

sepsym = ";"

def mnuAutocheckSpelling(parent = "mnuTools"):
        tag = "mnuAutocheckSpelling"
        if parent != "None":
                tag = eval(parent)() + sepsym + tag
        return tag

def lbl(parent = "None"):
        tag = "lbl"
        if parent != "None":
                tag = eval(parent)() + sepsym + tag
        return tag
------------------------------------------------------------------------
-----------

So, use this file framegedit.py, they can use like (in your scripts):
        import ldtp
        import framegedit

        ldtp.selectmenuitem(framegedit.frmgedit(), framegedit.mnuOpen())
and, if any tag name of control is changed, it just need to sync
framegedit.py with that.

Note: In this case, to use python2.5a which has a autocomlete feature,
all of this rather easy do.
        when you entry the symbol '.'(after the ldtp or frmagedit), then
hit a tab keyboad, you can see all of tag list in popup window


Please let me know if you have any questions or need more information.

Best Regards!
 
MSN:   [EMAIL PROTECTED]

Attachment: framegedit.py
Description: framegedit.py

Attachment: generatemap.py
Description: generatemap.py

_______________________________________________
LDTP-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/ldtp-dev

Reply via email to