07-09-2009, 06:44 PM
Yup Rajesh,
Anyhow we will see one more example for your understanding:
'First checkout the property value in OR for'Now setting the value in Agent Name edit box.
'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.
'It will highlight the password field
'Enter the password now.
Let me know if you need any thing else.
Thanks,
QTPKing
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.
msgbox Dialog("Login").WinEdit("Agent Name:").GetTOProperty("attached text")
Dialog("Login").WinEdit("Agent Name:").Highlight
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:"
msgbox Dialog("Login").WinEdit("Agent Name:").GetTOProperty("attached text")
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