Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SETTOPROPERTY
#6
Solved: 10 Years, 9 Months, 2 Weeks ago
Yup Rajesh,

Code:
Browser("Google").Page("Google").WebEdit("q").SetToProperty "name","Enter the UserDefine the value here"
Anyhow we will see one more example for your understanding:
'First checkout the property value in OR for
Code:
"Agent Name:" edit box.
msgbox Dialog("Login").WinEdit("Agent Name:").GetTOProperty("attached text")
Dialog("Login").WinEdit("Agent Name:").Highlight
'Now setting the value in Agent Name edit box.
Code:
Dialog("Login").WinEdit("Agent Name:").Set "QTPKING"
'Now i want to set the password in the "Password:" edit box which is not added in the OR.
'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:"
msgbox Dialog("Login").WinEdit("Agent Name:").GetTOProperty("attached text")
'It will highlight the password field
Code:
Dialog("Login").WinEdit("Agent Name:").Highlight
'Enter the password now.
Code:
Dialog("Login").WinEdit("Agent Name:").Set "Mercury"

Let me know if you need any thing else.
Thanks,
QTPKing
Reply


Messages In This Thread
SETTOPROPERTY - by rajeshdizzy - 07-09-2009, 04:19 PM
RE: SETTOPROPERTY - by Eazy007 - 07-09-2009, 04:59 PM
RE: SETTOPROPERTY - by rajeshdizzy - 07-09-2009, 05:21 PM
RE: SETTOPROPERTY - by supputuri - 07-09-2009, 05:39 PM
RE: SETTOPROPERTY - by rajeshdizzy - 07-09-2009, 05:53 PM
RE: SETTOPROPERTY - by rajeshdizzy - 07-10-2009, 02:18 PM
RE: SETTOPROPERTY - by supputuri - 07-09-2009, 06:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  The SetTOProperty on an object is n ot working... shibinp 0 2,951 09-02-2011, 06:39 PM
Last Post: shibinp
  Object required on SetToProperty zerocool 1 4,695 12-02-2010, 01:03 PM
Last Post: cdesserich

Forum Jump:


Users browsing this thread: 1 Guest(s)