1. GET RO Property Outputting Value
a1= dialog("text:=login").winedit("attached text:=Agent Name:").getroproperty("Width")
'msgbox a1
a2= dialog("text:=login").winedit("attached text:=password:").getroproperty("Width")
'msgbox a2
if(a1=a2) then
Reporter.ReportEvent micPass, "Width of Flight Login Window", "Correct"
Reporter.ReportEvent micDone, "Width ", a1
Reporter.ReportEvent micDone, "Password ", a2
else
Reporter.ReportEvent micFail, "Width of Flight Login Window", "InCorrect"
Reporter.ReportEvent micDone, "Width ", a1
Reporter.ReportEvent micDone, "Password ", a2
end if
Library functions Creation and Call
a1= dialog("text:=login").winedit("attached text:=Agent Name:").getroproperty("Width")
'msgbox a1
a2= dialog("text:=login").winedit("attached text:=password:").getroproperty("Width")
2. 'msgbox a2
‘call library functions (File->Associate Library with test)
Call add(20,30)
if(a1=a2) then
Reporter.ReportEvent micPass, "Width of Flight Login Window", "Correct"
Reporter.ReportEvent micDone, "Width ", a1
Reporter.ReportEvent micDone, "Password ", a2
else
Reporter.ReportEvent micFail, "Width of Flight Login Window", "InCorrect"
Reporter.ReportEvent micDone, "Width ", a1
Reporter.ReportEvent micDone, "Password ", a2
end if
File-> New->Library function
‘Add Function creation in library
Public Function Add(num1, num2)
' TODO: add function body here
result=num1+num2
msgbox result
End Function