below is giving error: Please correct them
msgbox getSomething()
A return type must be declared?
Function getFlatRate()
s = browser("B").Page("p").WebElement("we").GetROProperty("something")
return s
End Function
Printable View
below is giving error: Please correct them
msgbox getSomething()
A return type must be declared?
Function getFlatRate()
s = browser("B").Page("p").WebElement("we").GetROProperty("something")
return s
End Function
Hi try this,declair !
dim c
if c = window("flight reservation").winbutton("flight").getroproperty("flight") then
window("flight reservation").winbutton("flight").click
if c = c then
reporter.reportevent micpass,"flight button enabled ","clicked"
else
reporter.reportevent micfail,"flight button enabled","failed to clicked"
end if
end if
Just assign the value to be passed outside to the function name as below. Also for multiple variable outputs from functions use Call by Reference method.
msgbox getFlatRate()
Function getFlatRate()
s = browser("B").Page("p").WebElement("we").GetROProperty("something")
getFlatRate= s
End Function
[QUOTE=learqtptesting;32773]below is giving error: Please correct them
msgbox getSomething()
A return type must be declared?
Function getFlatRate()
s = browser("B").Page("p").WebElement("we").GetROProperty("something")
return s
End Function[/QUOTE]
msgbox getFlatRate()
Function getFlatRate()
s = "Test"
getFlatRate=s
End Function
Regards,
Nawab
dim s
call getFlatRate(s)
msgbox s
Function getFlatRate(s)
s = "Test"
End Function