Results 1 to 7 of 7

Thread: Dynamic Link

  1. #1
    Junior Member
    Join Date
    Feb 2008
    Answers
    12

    Dynamic Link

    Hi All,
    Am new to QTP,
    How QTP can select the Dynamic link?

    Regards,


  2. #2
    Expert Member
    Join Date
    Oct 2007
    Answers
    375

    Re: Dynamic Link

    Hi,

    Use Descriptive Programming. Incase the link gets created dynamically at runtime, it would not be part of your OR.

    Hence using Object Spy learn the Mandatory properties of the link created during runtime and pass the same the same to the Name:Value Pair.

    Set ObjDesc = Description.create()
    ObjDesc("name").value = "DynamicLinkName"
    objDesc("html tag").value = "PropertyValue"

    Use this ObjDesc in your script at the instance where the Dynamic link occurs.

    Option 2

    Incase the link is already a part of your OR, but only the property changes at runtime, use the GetROProperty method to fetch the runtime value of name, text of the link. Update the TestObject Property accordingly.

    Cheers....


  3. #3
    Junior Member
    Join Date
    Feb 2008
    Answers
    12

    Re: Dynamic Link

    Hi,

    That Dynamic link is the part of OR and we need to open that link for editing. for that need to use the Click method. Can you please tell me how to use GetRoProperty with Click method.
    Could you please explain me how to Update the Test Object Property.



    Regards,

    Last edited by monikasangwan; 02-20-2008 at 08:40 AM.

  4. #4
    Expert Member
    Join Date
    Oct 2007
    Answers
    375

    Re: Dynamic Link

    Hi,

    use the GetROProperty to trap the dynamic properties of the specified link.

    Unfortunately QTP does not have a SetROProperty to change the Object properties at runtime. We can use the Object method to change the property like -

    WebElement.Object.PropertyName = "PropertyValue".

    You could use the above syntax to try and change the Link properties to trapped Dynamic values. Use the click method on that then.

    I would still suggest you use descriptive programming which would be a better solution.

    Cheers...


  5. #5
    Expert Member
    Join Date
    Sep 2007
    Answers
    110

    Re: Dynamic Link

    Hi Umesh,

    The script you have given is usefull for the dynamically created link.

    But how to click on the link which is scrolling here and there in a page?

    _________________

    Rajaputra


  6. #6
    Banned
    Join Date
    Oct 2007
    Answers
    173

    Re: Dynamic Link

    Have you checked QTP repository , as you said in your mail its a dynamic Menu the menu name recorded and while replay may not match in your repositiry.
    You can parametrize your menu name property in your repositiry.


  7. #7
    Junior Member
    Join Date
    Feb 2008
    Answers
    12

    Re: Dynamic Link

    Can you please Elaborate the following statement:
    WebElement.Object.PropertyName="PropertyValue"


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