Results 1 to 5 of 5

Thread: Child object property keep changing

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Contributing Member
    Join Date
    Sep 2007
    Answers
    62

    Child object property keep changing

    Hi guys
    I have problem with one script.
    My script is:
    Browser("abc").Page("xyz").WebEdit("aaa").Set 123
    Above code my the WebEdit value is change "bbb".May be in next release my programmer will again change the WebEdit property So could anyone please tell me how to handle this situation.

    Please help me.

    Thanks
    Newhere


  2. #2

    Re: Child object property keep changing

    You will need to update your script again.

    There might be another way though. How comfortable are you with HTML DOM?


  3. #3
    Contributing Member
    Join Date
    Sep 2007
    Answers
    62

    Re: Child object property keep changing

    Hi anshoo thanks for your reply.
    i am not comfy with html dom. Well in my script when recorded earlier my object name was “ID” and now its changed to “FROM ID” so when i run my test i am getting error: (cannot identify the object "id" (of class webedit). Verify that this object's properties match an object currently displayed in your application.)
    I tried to changed the object name manually in my script and also in OR still getting error message. This is my script:
    browser("admin").page("admin_3").webedit("id").set "id10002"
    In My company everybody new for QTP just couple of month back they have introduced.

    Thanks
    Newhere

    Last edited by newhere; 04-14-2008 at 08:52 AM.

  4. #4

    Re: Child object property keep changing

    You can use the following method and see if your script works as expected:

    1. Use the Object Spy and click on the WebEdit which has its description altered by the Dev team

    2. Find the "name" property and see its "value" to its right (in the 2nd column)

    Now, use that value and plug it in the following script:

    Browser("admin").Page("admin_3").WebEdit("name:=from id").Set "id10002"

    Note that the value next to "name:=" is "from id". This "from id" is the value to the right of the "name" property that you retrieved from the Object Spy.

    Let me know if this works..


  5. #5
    Contributing Member
    Join Date
    Sep 2007
    Answers
    62

    Re: Child object property keep changing

    Quote Originally Posted by Anshoo_Arora View Post
    You can use the following method and see if your script works as expected:

    1. Use the Object Spy and click on the WebEdit which has its description altered by the Dev team

    2. Find the "name" property and see its "value" to its right (in the 2nd column)

    Now, use that value and plug it in the following script:

    Browser("admin").Page("admin_3").WebEdit("name:=from id").Set "id10002"

    Note that the value next to "name:=" is "from id". This "from id" is the value to the right of the "name" property that you retrieved from the Object Spy.

    Let me know if this works..

    Thanks Man
    I tried above script but not working. Again i tried to change name in OR manually now its working but Thanks for you help. I m gonna find out what was wrong in my script. Why it wasnt working as you say.

    Thanks
    Newhere


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