Click after CheckProperty to a WebElement passed via Function argument fails - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Click after CheckProperty to a WebElement passed via Function argument fails (/Thread-Click-after-CheckProperty-to-a-WebElement-passed-via-Function-argument-fails) |
Click after CheckProperty to a WebElement passed via Function argument fails - naruoga - 02-28-2019 Hi, I'm very new to UFT. Now I have two scripts like: Code: Browser().Page().WebEdit("editBoxA").Set "SomeValue" and: Code: Browser().Page().WebEdit("editBoxB").Set "SomeValue" So I thought it would be nice if I can use Shared Library Function like: Code: Public Sub checkElement(ByRef element) 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. |