SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 10 of 10
  1. #1
    Member
    Join Date
    Sep 2006
    Location
    Mumbai
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    webelement problem

    Hi,

    I have solved for single element where I have given the input to the web element.

    Browser(“browser”).page(“page”).frame(“frame”).obj ect.innerText=”new value”
    This solves me for single web element.

    My problem is I have two webelements where I want to give the input in the same frame.

    I have tried this it won’t work

    Browser(“browser”).page(“page”).frame(“frame”).web element(“html tag:=BODY”,”innertext:=.*”,”index:=0”).object.inne rText=”new value”

    It throws error like “Cannot find the "[ WebElement ]" object's parent "Frame" (class Frame). Verify that parent properties match an object currently displayed in your application.”

    Can any body please solve this problem.

    Thanks in advance.

    Regards
    Smita

  2. #2
    Senior Member
    Join Date
    Oct 2005
    Location
    Universe
    Posts
    393
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: webelement problem

    Hi Smita,

    As per the error QTP is not able to recognize the "Frame" object, check out the properties of the frame.

    Thanks,
    Wasim
    Merrill Lynch
    Mumbai

  3. #3
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: webelement problem

    Post the HTML source code of that frame

  4. #4
    Junior Member
    Join Date
    Dec 2006
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: webelement problem

    Hi,

    QTP records something as webelement when it is unable to recoqnize it. I would suggest you to install Java add in / .Net addin

    I believe this should solve the problem

    Cheers,
    Sumit

  5. #5
    Member
    Join Date
    Sep 2006
    Location
    Mumbai
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: webelement problem


    Hi,

    The below code is only difference between the two webelements.

    <BODY class=mceContentBody dir=ltr editorId="mce_editor_0">vcvbfbvgbgvbhgh,fdgfdfg dfgdfgt</BODY></HTML>
    <BODY class=mceContentBody dir=ltr editorId="mce_editor_1">gggfgghfh</BODY></HTML>

    Regards
    smita

  6. #6
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: webelement problem

    try

    Browser("browser").page("page").frame("frame").obj ect.getElementsByTagName("BODY").item(0).innerText ="Text box 1"

    Browser("browser").page("page").frame("frame").obj ect.getElementsByTagName("BODY").item(1).innerText ="Text box 2"

  7. #7
    Member
    Join Date
    Sep 2006
    Location
    Mumbai
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: webelement problem

    Hi,

    I used that code but it has thrown error like

    "The "Frame" object's description matches more than one of the objects currently displayed in your application. Add additional properties to the object description in order to uniquely identify the object."

    is there any other method?

    Thanks for your help

    regards,
    Smita

  8. #8
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,788
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: webelement problem

    Add the index of the frame.

    Mark Smith.

  9. #9
    Member
    Join Date
    Jul 2004
    Location
    UK
    Posts
    201
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: webelement problem

    Hi Smiths,

    As Mark says, do spy on from and find index value then add property and value for index.

    otherwise

    add index property to object identification

    I could see some times spy do not show index value for frame,so try like

    Browser(“browser”).page(“page”).frame("index:=0"). webelement...

    Browser(“browser”).page(“page”).frame("index:=1"). webelement...
    .
    .

    Till you find the exact frame you are looking for then add that index value to object in OR
    Malleswari.

  10. #10
    Member
    Join Date
    Sep 2006
    Location
    Mumbai
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: webelement problem

    Hi,

    Thanks for your great help.I have solved my problem with index help.The below code has solved my problem.

    browser("browser").Page("page").frame("index:=1"). object.getElementsByTagName("BODY").item(0).innerT ext="Text box 2"
    browser("browser").Page("page").frame("index:=2"). object.getElementsByTagName("BODY").item(0).innerT ext="Text box 4"

    Regards,
    Smita

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 03:40 AM.

Copyright BetaSoft Inc.