img

Tracer

Functional Testing Tool


Tracer is a functional testing tool, which can also be used for regression testing. It supports window based applications developed on win32 API. It follows data driven approach. The Traceit Control gets the properties such as class, caption, Handle, Height and width of all the objects. Based on the properties script would be written in code editor using Lua script. The script would be executed to automate the target application.

For more information visit www.tracet.net

To write a new script, Click New or Ctrl+N, a new code edit window will be created.





All the options related to code editor are available here.

All the options related to fonts and colors of the code editor are available here.

The submenu items short cut can be assigned here by selecting the specific sub menu, the current short cut selection would be displayed in the current Shortcuts: text edit box. It can be edited here.

TraceIt Window consists of three icons - spy open, spy close and Generate code. The spy open is used to spy the properties of any win32 control such as Handle, caption, native class, height and width. The properties are generated as code in the code editor window by clicking the Generate code button. The control can be closed by clikcing spy close

TraceIt control is used to spy the properties such as Handle, caption, native class, height and width of any win32 control.




How to get total number of items in treeview
TVCount() This functions returns total number of items in the tree view.

	Tree=parent:tt_TreecontrolHandle
	("nativeclass=SysTreeView32","height=23","width=113")
	tCount=Tree:TVCount() 



How to expand a treeview
TV_TreeClick(String arg1) This string passed in treeview arg1 which matches the tree view item would be expanded

	Tree=parent:tt_TreecontrolHandle
	("nativeclass=SysTreeView32","height=23","width=113")
	Tree:TV_TreeClick("New Employee")  

How to set the position of the SliderBar Control
SetPos(int arg1) the arg1 sets the position of the SliderBar control.

	slider=parent:tt_SliderControlHandle
	("nativeclass=msctls_trackbar32","height=23","width=113") 
	slider:SetPos(50)



How to get the position of the SliderBar Control
GetPos() This function returns the position of the SliderBar in integer

	slider=parent:tt_SliderControlHandle
	("nativeclass=msctls_trackbar32","height=23","width=113")
	islider=slider:GetPos()

How to select the specific tab
SelectTab(int arg1) The tab is selcted based on the zero based index passed in the arg1.

	Tab=parent:tt_TabcontrolHandle("nativeclass=SysTabControl32","height=23","width=113") 
	Tab:SelectTab()



How to get number of tab in tab control
TabCount() This function returns total number of tab available in the tab control.

	Tab=parent:tt_TabcontrolHandle("nativeclass=SysTabControl3","height=23","width=113") 
	tCount=Tab:TabCount()

How to get the position of the ScrollBar Control
GetPos() This function returns the position of the scrollbar in integer

	Scroll=parent:tt_ScrollBarHandle("nativeclass=ScrollBar","height=23","width=113")
	iScroll=Scroll:GetPos()



How to set the position of the ScrollBar Control
SetPos(int arg1) the arg1 sets the position of the scrollbar control.

	Scroll=parent:tt_ScrollBarHandle("nativeclass=ScrollBar","height=23","width=113")
	Scroll:SetPos(50)

How to set string in RcihEdit Control
SetText(string arg1) The string passed in arg1 will be set in the RichEdit control.

	Rich=parent:tt_RichEditHandle("nativeclass=RichEdit20A","height=23","width=113") 
	SetText("Tracer is a Automation testing tool")



How to get the position of the ProgressBar Control
GetPos() This function returns the position of the ProgressBar in integer

	progress=parent:tt_ProgressBarHandle("nativeclass=msctls_progress32","height=23","width=113") 
	iprogress=progress:GetPos()



How to set the position of the ProgressBar Control
SetPos(int arg1) the arg1 sets the position of the ProgressBar control.

	progress= parent:tt_ProgressBarHandle ("nativeclass=msctls_progress32","height=23","width=113")
	progress:SetPos(50)

How to click on the subitem of the listview
LVSB_LClk(int arg1,int arg2) arg1 refers to the listview item and arg2 - listview subitem

	lView=parent:tt_ListViewHandle ("nativeclass=SysListView32","height=23","width=113") 
	lView:LVSB_LClk(1,1) 

How to click on the subitem of the listview
LVSB_LClk(int arg1,string arg2) arg1 refers to the listview item and arg2 - listview subitem name.

	lView=parent:tt_ListViewHandle("nativeclass=SysListView32","height=23","width=113")
	lView:LVSB_LClk(1,"Trace")

How to doubleclick on the subitem of the listview
LVSB_LDClk(int arg1,int arg2) arg1 refers to the listview item and arg2 - listview subitem.

	lView=parent:tt_ListViewHandle("nativeclass=SysListView32","height=23","width=113") 
    lView:LVSB_LDClk(1,1)

How to doubleclick on the subitem of the listview
LVSB_LDClk(int arg1,string arg2) arg1 refers to the listview item and arg2 - listview subitem name

	lView=parent:tt_ListViewHandle("nativeclass=SysListView32","height=23","width=113") 
    lView:LVSB_LDClk(1,"Trace")

How to rightclick on the subitem of the listview
LVSB_LDClk(int arg1,string arg2) arg1 refers to the listview item and arg2 - listview subitem name

	lView=parent:tt_ListViewHandle("nativeclass=SysListView32","height=23","width=113") 
	lView:LVSB_LRClk(1,"Trace") 

How to find item count in ListBox
LBCount() This function would return total items in ListBox.

	ListBox=parent:tt_ListBoxHandle("nativeclass=ListBox","height=23","width=113") 
	iList=ListBox:LBCount()

How to get name of the item in Listbox
LBGetText(int arg1) Passing the zero based index of the ListBox returns the item name.

	ListBox=parent:tt_ListBoxHandle("nativeclass=ListBox","height=23","width=113") 
    iList=ListBox:LBGetText(2) 

How to get index of the item in Listbox
LBGetIndex(string arg1) Passing the string of the ListBox returns the item index.

	ListBox=parent:tt_ListBoxHandle("nativeclass=ListBox","height=23","width=113") 
	iList=LBGetIndex("Trace Technology") 

How to get select item in the ListBox LBIselect(int arg1)
LBTselect(string arg1 ) The item in the ListBox can be selected either by passing zero based item index or item name.

	ListBox=parent:tt_ListBoxHandle("nativeclass=ListBox","height=23","width=113") 
	LBIselect(2) )

How to set text in the edit control
SetText(string arg1 ) The string which is to be set in the edit control should be passed in the string arg1.

	Edit=parent:tt_EditcontrolHandle("nativeclass=Edit","caption=Username","height=23","width=113") 
	Edit:SetText("User1") 

How to get text in the edit control
GetText(string arg1 ) The string from the edit control would be received in the string arg1.

	Edit=parent:tt_EditcontrolHandle("nativeclass=Edit","caption=Username","height=23","width=113") 
	eUser=Edit:GetText() 

How to set text in the edit control
SetPassword(string arg1 ) The string(password) which is to be set in the edit control should be passed in the string arg1.

	Edit=parent:tt_EditcontrolHandle("nativeclass=Edit","caption=Password","height=23","width=113") 
	Edit:SetPassword("Trace") 

How to get Password in the edit control
GetPassword(string arg1 ) The string(Password) from the edit control would be received in the string arg1.

	Edit=parent:tt_EditcontrolHandle("nativeclass=Edit","caption=Password","height=23","width=113") 
	ePass=Edit:GetPassword() 

How to single click on a Button
Click() or Lclick() This functions enables a click on the Button.

	Button=parent:tt_ButtoncontrolHandle("nativeclass=Button","caption=OK","height=23","width=113") 
	Button:Click() 

How to double click on a Button
DoubleClick() This functions enables double click on the Button.

	Button=parent:tt_ButtoncontrolHandle("nativeclass=Button","caption=OK","height=23","width=113") 
	Button:DoubleClick()

How to uncheck a Button
UncheckButton() This functions unchecks the Button.

	Button=parent:tt_ButtoncontrolHandle("nativeclass=Button","caption=OK","height=23","width=113") 
	Button:UncheckButton()

How to check a Button
CheckButton() This functions checks the Button.

	Button=parent:tt_ButtoncontrolHandle("nativeclass=Button","caption=OK","height=23","width=113") 
	Button:CheckButton() 

How to set Date in DateTime Control
DTSet(string arg1) The string passed in arg1 will be set in the DateTime control.

	bdate=parent:tt_DateTimeHandle("nativeclass=SysDateTimePick32","caption=Salary Date:","height=24","width=231") 
	bdate:DTSet("08->04->2018")

How to show/hide the comboBox control
CBDropDown(BOOL arg1) The contents of combo box can be shown/hidden by setting 0 to show and 1 to Hide in arg1.

	combo=parent:tt_ComboBoxControlHandle( "nativeclass=ComboBox","caption=Mail Id:","height=21","width=102") 
	CBDropDown(1) 

How to get item count in the ComboBox
CBGetCount() Total number of items can be retreived from this function.

	combo=parent:tt_ComboBoxControlHandle( "nativeclass=ComboBox","caption=Mail Id:","height=21","width=102") 
	icount=combo:CBGetCount() 

How to click on an item in the ComboBox control
CBClick() This function is used to click on an item in the ComboBox.

	combo=parent:tt_ComboBoxControlHandle( "nativeclass=ComboBox","caption=Mail Id:","height=21","width=102") 
	combo:CBSelString("Team Lead")
	combo:CBClick() 

How to get text from the combo control
CBGetText(int arg1) Zero based index of text need to passed in the arg1.

	combo=parent:tt_ComboBoxControlHandle( "nativeclass=ComboBox","caption=Mail Id:","height=21","width=102") 
	i=combo:CBGetText(1)

How to select item from the combo control based on stringv
CBSelString(string arg1) CBSelectString(string arg1) the item which matches the string passed in the arg1 would be selected.

	combo=parent:tt_ComboBoxControlHandle( "nativeclass=ComboBox","caption=Mail Id:","height=21","width=102") 
	combo:CBSelString("Team Lead")