SETTOPROPERTY - 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: SETTOPROPERTY (/Thread-SETTOPROPERTY) |
SETTOPROPERTY - rajeshdizzy - 07-09-2009 Hi all.. I used settoproperty of a yahoomail login,i wrote the script which i have referred from other blogs.....may i know is this script is correct,becoz when i run the application i getting error in the 1st line itself....pls suggest me the correct solution for SETTOPROPERTY... Code: browser("Yahoo! Mail: The best").Page("Yahoo! Mail: The best").WebEdit("login").type "rajeshdizzy" Thankz L.Rajesh RE: SETTOPROPERTY - Eazy007 - 07-09-2009 You say it's the first line where the error occurs... if this is so, try replacing 'type' with 'set'. Then see what happens if it gets to the second line. RE: SETTOPROPERTY - rajeshdizzy - 07-09-2009 Its not working still error appears.... Code: Sub setToproperty which one is the correct syntax? the one which i have posted or previous one...pls clear me with an example RE: SETTOPROPERTY - supputuri - 07-09-2009 Hi Rajesh, I think you know the basic use with 'SetToProperty' (Which will set the Test Object property with user defined property) and one more thing we have to keep in mind is this will work/show affect only in that particular run (but not affect/chage the Test Object properties in OR). Here i have taken the Google page for example: Please open Google page and add "Google Search Edit box" to the OR and then execute the following LOC. Code: 'This will return the name property value of Google Search editbox ("q") Pls check out the property of Web edit before and after the execution (It will be the same in OR). Let me know if you need any more info. Thanks, Sridhar RE: SETTOPROPERTY - rajeshdizzy - 07-09-2009 Code: Browser("Google").Page("Google").WebEdit("q").SetToProperty "name","GoogleSearchBox" RE: SETTOPROPERTY - supputuri - 07-09-2009 Yup Rajesh, Code: Browser("Google").Page("Google").WebEdit("q").SetToProperty "name","Enter the UserDefine the value here" 'First checkout the property value in OR for Code: "Agent Name:" edit box. Code: Dialog("Login").WinEdit("Agent Name:").Set "QTPKING" 'I can do it by changing the objct propery value in OR in runtime by using SetTOProperty. '**** 'Assigning the Password attached text proptery (="Password:") to Agent Name. Code: Dialog("Login").WinEdit("Agent Name:").SetTOProperty "attached text","Password:" Code: Dialog("Login").WinEdit("Agent Name:").Highlight Code: Dialog("Login").WinEdit("Agent Name:").Set "Mercury" Let me know if you need any thing else. Thanks, QTPKing RE: SETTOPROPERTY - rajeshdizzy - 07-10-2009 Its working.... Thankz sridhar.... |