Hi, I'm very new to UFT.
Now I have two scripts like:
and:
So I thought it would be nice if I can use Shared Library Function like:
then each scripts could be:
But I got an error
> Cannot identify the object "editBoxA" (of class WebEdit)
in the line "element.click".
I tried to comment out CheckProperty line, then it works fine.
Please someone let me know of my mistake, or more efficient code.
Now I have two scripts like:
Code:
Browser().Page().WebEdit("editBoxA").Set "SomeValue"
Browser().Page().WebEdit("editBoxA").CheckProperty "value","SomeValue"
Browser().Page().WebEdit("editBoxA").Click
and:
Code:
Browser().Page().WebEdit("editBoxB").Set "SomeValue"
Browser().Page().WebEdit("editBoxB").CheckProperty "value","SomeValue"
Browser().Page().WebEdit("editBoxB").Click
So I thought it would be nice if I can use Shared Library Function like:
Code:
Public Sub checkElement(ByRef element)
element.Set "SomeValue"
element.CheckProperty "value","SomeValue"
element.Click
end
Code:
checkClick Browser().Page().WebEdit("editBoxA")
> Cannot identify the object "editBoxA" (of class WebEdit)
in the line "element.click".
I tried to comment out CheckProperty line, then it works fine.
Please someone let me know of my mistake, or more efficient code.