[LDTP-Dev] sry, I lost my attachment

Guofu Xu Guofu.Xu at palmsource.com
Tue Jul 4 00:54:10 PDT 2006



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:   lavixu at hotmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: framegedit.py
Type: application/octet-stream
Size: 19900 bytes
Desc: framegedit.py
Url : http://lists.freedesktop.org/archives/ldtp-dev/attachments/20060704/32062d79/framegedit-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: generatemap.py
Type: application/octet-stream
Size: 3328 bytes
Desc: generatemap.py
Url : http://lists.freedesktop.org/archives/ldtp-dev/attachments/20060704/32062d79/generatemap-0001.obj


More information about the LDTP-dev mailing list