Getting Error: Object doesn't support - 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: Getting Error: Object doesn't support (/Thread-Getting-Error-Object-doesn-t-support) |
Getting Error: Object doesn't support - mydestiny - 04-13-2009 Hi, Well first of all i would like to thank to learnQTP I am new to QTP and learning from this site only. Got enough materials and especially good tips from the forum. I have written the following code: Code: Dim sOpenUrl When i executed .. i am getting following error: Object doesn't support this property or method: 'userNameObject(...).Set' Line (10): "userNameObject(i).Set "Demo"". Can any one guide me? Also please suggest whether i have implemented DP concept correctly or not ? Cheers, Prasad RE: Getting Error: Object doesn't support - Tarik Sheth - 04-13-2009 Here is the corrected code: Code: Dim sOpenUrl 'Verify whether the object exist or not, put else condition if it does not. Code: If userNameObject.Count <>0 Then I hope this clears your query. Code: Function invokeURL(sUrl ) Add str="Demo" RE: Getting Error: Object doesn't support - mydestiny - 04-14-2009 Thanks Tarik. But if i want to use the same concept for password field which micclass is also webEdit, then QTP won't identify which editfield it is going to put the value. Any suggestion!!!! RE: Getting Error: Object doesn't support - Tarik Sheth - 04-14-2009 Ok, For every editbox class just define html tag as "INPPUT", in this case there are 2 edit box available on the web page so you need to include webedit class and html tag as "INPUT". Following is what you need to write. Code: Dim sOpenUrl 'This code will input Demo in username and password fields. Code: objDescriptive("html tag").value="INPUT" 'Verify whether the object exist or not, put else condition if it does not. Code: If userNameObject.Count <>0 Then Code: Function invokeURL(sUrl ) Hope this will answer your query |