SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 10 of 10
  1. #1
    Member
    Join Date
    Jul 2007
    Posts
    51
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Unable to handle Customize page

    Hi All,

    My application has some customize options to wedding cards, Once I select a card and go to nextpage I have some customize option for the text displaying on the card. I can change the font, size, colour of that text displayed on the card and intresting part is its Ajax based object, after selecting a particular font for a particular text on card only the card refreshes and changes the font. I am using QTP 9.2 and when I am spying on this card object, QTP identifies the object as webElement. I am attaching the spy window here. My question is can I verify this changing text font, size using QTP?

    Thanks.
    Attached Images Attached Images

  2. #2
    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: Unable to handle Customize page

    Search for currentStyle on the forum and you will get a lot of examples.

  3. #3
    Member
    Join Date
    Jul 2007
    Posts
    51
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Unable to handle Customize page

    Hi Tarun, Thanks for your help, I have searched forum on CurrentStyle and could get some info on it. But when i am trying to this
    Msgbox Browser("browser").Page("page").WebElement("WebEle ment").Object.CurrentStyle.backgroundcolor it returns "transperent" and you said this "happens because of background being inherited from some other control" but how to handle such objects now?

    Thanks for your time and help.

  4. #4
    Advanced Member
    Join Date
    Aug 2007
    Location
    Six Feet Under
    Posts
    717
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Unable to handle Customize page

    [ QUOTE ]
    how to handle such objects now?

    [/ QUOTE ]
    what do you want to do with that? what exactly you want?

    Regards,
    Manish Bansal
    Thanks,
    Manish Bansal

    Checkout Blog Page At
    http://www.softtechlabs.com

  5. #5
    Senior Member
    Join Date
    Feb 2008
    Location
    Los Angeles, CA, USA
    Posts
    861
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Unable to handle Customize page

    The information about style maybe present in the outerhtml of the webelement. Explore its content, you will surely find some information within
    -Suchit

  6. #6
    Member
    Join Date
    Jul 2007
    Posts
    51
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Unable to handle Customize page

    This object is a preview of a card, I can change the text, font, color on the card, when ever I select different fonts and change text, I want to verify this with QTP.

    The outterhtml of this object contains this value
    <font class="small">Code:</font><hr /><pre>
    "&lt;DIV id=scene7text1 style="BACKGROUND: url(http://s7d5.scene7.com/is/imag
    e/Minted/EGG-SWZ-INV?$layer_8_text_0=%7B%5Crtf1%5Cansi%7B%5Cfonttbl %5Cf1%5Cfnil+Trade+Gothic+Medium%3B%
    7D%7B%5Ccolortbl%5Cred120%5Cgreen94%5Cblue84%3B%5C red255%5Cgreen106%5Cblue81%3B%7D%5Cvertalt%5Cli0%5 C
    ri0%5Cfi0%5Cf3%5Ci0%5Cb0%5Cul0%5Cqr%5Csl-220%5Cf1%5Cfs20%5Ccf0+Marlo+Kirchner+and+Wim+Chris tensen
    +together+with+their+parents%5Cpar%5Cqr%5Csl-220%5Cf1%5Cfs20%5Ccf0+Invite+you+to+join+them+in
    +celebrating+their+marriage%5Cpar%5Cqr%5Csl-220%5Cf1%5Cfs20%5Ccf0+Wednesday%2C+the+fourteenth
    +of+February%2C+two+thousand+nine%5Cpar%5Cqr%5Csl-220%5Cf1%5Cfs20%5Ccf0+at+three+o%27clock%5Cpar%5Cq r%
    5Csl-220%5Cf1%5Cfs20%5Ccf0+Timberland+Lodge+on+Mount+Ho od%2C+Oregon%5Cpar%5Cqr%5Csl-220%5Cf1%5Cfs20%5Ccf0+
    Reception+to+follow%5Cpar%7D&amp;layer=1&amp;op_co lorize=242,224,202&amp;layer=2&amp;op_colorize=255 ,106,81&amp;resMode=sharp) no-repeat 0px 0px; WIDTH: 396px; HEIGHT: 396px"&gt;&lt;/DIV&gt;"
    </pre><hr />

    I guess its pointing to an other object, how do I handle this.

    Thanks All.

  7. #7
    Senior Member
    Join Date
    Feb 2008
    Location
    Los Angeles, CA, USA
    Posts
    861
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Unable to handle Customize page

    phew... too complex

    Use some function to convert the given string to a character string and post the resultant string. I do see some arguments refering to coloring in the last second line.
    -Suchit

  8. #8
    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: Unable to handle Customize page

    Download IE WebDeveloper from internet and use the tool find the property you are looking for.

  9. #9
    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: Unable to handle Customize page

    This would be different i guess

    Print browser().object.document.getElementById("scene7co lors").currentStyle.backgroundImage

  10. #10
    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: Unable to handle Customize page

    This would give even better picture

    Print UnEscape(browser().object.document.getElementById( "scene7colors").currentStyle.backgroundImage)

 

 

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 11.11%
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 04:11 PM.

Copyright BetaSoft Inc.