Results 1 to 3 of 3

Thread: Modify property value of an object in QTP

  1. #1
    Junior Member
    Join Date
    Apr 2008
    Answers
    3

    Modify property value of an object in QTP

    How to modify the property value of an object in QTP?

    I have used the following script but I am gettiing empty in the message box.Plz help me.

    var=Browser("Yahoo!").Page("Yahoo!").Link("Mail").setToproperty ("name", "newmail")
    msgbox var

    thanks in advance


  2. #2
    Expert Member
    Join Date
    Jan 2007
    Answers
    211

    Re: Modify property value of an object in QTP

    Quote Originally Posted by kishchilukuri View Post
    How to modify the property value of an object in QTP?

    var=Browser("Yahoo!").Page("Yahoo!").Link("Mail").setToproperty ("name", "newmail")


    thanks in advance
    setToProperty("name:=newmail")


    Regards,
    Nawab


  3. #3
    Contributing Member
    Join Date
    Feb 2008
    Answers
    36

    Re: Modify property value of an object in QTP

    Hi there,

    Try this code,

    var = Browser("Yahoo!").Page("Yahoo!").Link("Mail").GetTOProperty("name")
    msgbox var

    'Code to assign new value to the property
    Browser("Yahoo!").Page("Yahoo!").Link("Mail").SetTOProperty
    "name", "Newmail"

    'Code to fetch the new value
    var = Browser("Yahoo!").Page("Yahoo!").Link("Mail").GetTOProperty("name")
    msgbox var

    Regards,
    Tina Mahajan.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact