![]() |
object required 'A' error - 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: object required 'A' error (/Thread-object-required-A-error) |
object required 'A' error - sia sharma - 08-21-2012 hi all i m getting this error while running this code thanks sia Code: A = Browser("Justdial").Page("Justdial").WebElement(DataTable("categories", dtGlobalSheet)).GetROProperty("innertext") RE: object required 'A' error - Ankesh - 08-21-2012 @ Sia, the below statement returns a string Code: A = Browser("Justdial").Page("Justdial").WebElement(DataTable("categories", dtGlobalSheet)).GetROProperty("innertext") you can not check for the existance of the string using .Exist method. This can be used only for objects. Hence you are getting the error as object required for the statement. If you want to check if the string found or not, you should use INstr function. Refere to qtp help. Regards, Ankesh RE: object required 'A' error - sree.85 - 08-23-2012 replace the code with if not isempty(a) then .... .... |