I couldn't rectify the error in following script..pls helpme frds.. - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: I couldn't rectify the error in following script..pls helpme frds.. (/Thread-I-couldn-t-rectify-the-error-in-following-script-pls-helpme-frds) |
I couldn't rectify the error in following script..pls helpme frds.. - Kishore_J - 01-23-2011 Hi Frds, Please help me on this following script..I have written Function script to enter username,pwd fields and verify status. '**** Following script for ActiTIME-Login" screen. Code: Set un = Browser("ActiTIME-Login").Page("ActiTIME-Login").webedit("username") When i am executing the above script it's giving error message "Type Mismatch: Status = verifyobjexistandenabled(testobj)" Please help me what is the problem in the above script?? What is the object method we can use for verify status (For web & Windows) Thanks in Advance, RE: I couldn't rectify the error in following script..pls helpme frds.. - cdesserich - 01-24-2011 Usually when you get that error, the function is not associated with the test, or the function name is misspelled. Where do you have the function "verifyobjexistandenabled()" defined? If it is in an external function library file, make sure it is associated with your test. Also make sure the definition is spelled the same way. RE: I couldn't rectify the error in following script..pls helpme frds.. - Kishore_J - 01-24-2011 Thanks for your replay RE: I couldn't rectify the error in following script..pls helpme frds.. - cdesserich - 01-24-2011 Did you figure it out? RE: I couldn't rectify the error in following script..pls helpme frds.. - Kishore_J - 01-25-2011 No. Actually, here i used Function as --Function objectset(testobj, sinput)- and in the same script only i am calling. But, i couldn't recognise what i did mistake for status verification.."Status = verifyobjexistandenabled(testobj)" Can you please elabrate this..and also if you give some info about what are the methods will support for window applications.. Thanks in advance, RE: I couldn't rectify the error in following script..pls helpme frds.. - cdesserich - 01-26-2011 I'm not sure what you are trying to accomplish here. You seem to be avoiding QTP native functions. I would code this something more like this: Code: With Browser("ActiTIME-Login").Page("ActiTIME-Login") If you are trying to create a reusable function for checking if the object exists and is enabled, you could create a separated function library and do something like the code below putting the ExistAndEnabled function in the separate library and associating it to your test. If it is defined in the test, the RegisterUserFunc statement must be executed before the function can be used: Code: Function ExistsAndEnabled(test_object) I'm not sure if this is going to help you or not, but I hope it does. RE: I couldn't rectify the error in following script..pls helpme frds.. - Kishore_J - 01-26-2011 Thanks for your helping me in this..yea, i got it...thank you very much.. RE: I couldn't rectify the error in following script..pls helpme frds.. - cdesserich - 01-26-2011 No problem. Hope I helped. |