SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Dec 2000
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Highlighted text not $BackColor?

    I need to verify that some text is highlighted by a Web application I'm testing. The Web application turns the color behind the HtmlText or HtmlLink object yellow, which to me, seems like it has set the $BackColor to yellow. However, it says the $BackColor is white! So, what does SilkTest consider the yellow highlighting to be, if not the $BackColor, and how do I verify it?


    Thanks!

  2. #2
    Junior Member
    Join Date
    Dec 2000
    Location
    Camberley, UK
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Highlighted text not $BackColor?

    Yoobi,

    I've only found 2 ways of testing this as SilkTest doesn't seem to cater for it.

    You can either do a bitmap check

    or

    Use typekeys to do a control-c to copy any highlighted text and then check the contents of the clipboard using Clipboard.GetText().

    hope that helps

    Steve

  3. #3
    Senior Member
    Join Date
    Jul 1999
    Location
    New York, NY, USA
    Posts
    137
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Highlighted text not $BackColor?

    The way I do this is to make sure that I have a good unique tag for the object containing the text in the include file, then you can record a verify method for the textfield.In the list of string inside the verify, select SelectedText, if the text will always be the same, you have the answer you need because it will fail if the text is not selected. If the text changes, create a STRING variable and substitute the variable's name for the actual text. Make sure that you read the expected value into the string variable before the verify.

    In either case, realize that unless you are concerned with what color the background is, the verify stat will fail if the text is different or not selected. I almost always nest this inside a Do Except statement because the testcase will end if it fails and you will probably want to continue if it is a non critical error.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 09:11 PM.

Copyright BetaSoft Inc.