SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Dec 2000
    Location
    Pune, India
    Posts
    135
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ho to test “Htm Help” using SilkTest?

    I want to test the help pages of an application.

    The Help is similar to Help available in Internet Explorer (5.x).

    I want to verify if the page displayed on the right page has the same topic which I have selected in left?

    Can anyone pl suggest how I can get the topic on the right page? (It is recorded as custom object, so I am not able to use any standard method like gettext())

    ------------------

  2. #2
    Senior Member
    Join Date
    Aug 1999
    Location
    Irvine, CA
    Posts
    157
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ho to test “Htm Help” using SilkTest?

    I have included code for a function that returns the 3rd line of text in the HTML help dialog. I use the third line, because for our application, this is the text that corresponds to the topic title.

    The code uses the clipboard to get the entire contents from the help text window pane. Kind of a cheesy way to do it, but it works for us...

    At one time I had tried briefly to get the HTML help dialog to be recognized at a browser window but was unsuccessful.

    <code>
    [+] string GetHelpText()
    [ ] window w = Help.HHChild2.ShellEmbedding1.ShellDocObjectView1. InternetExplorer_Server1
    [ ] list of string ls
    [ ] string s
    [-] if Help.Exists()
    [ ] AscentHelp.SetActive ()
    [ ] w.Click(1,1,1)
    [ ] Help.TypeKeys("<Ctrl-a>") // Select All
    [ ] Help.TypeKeys("<Ctrl-c>") // Copy Help Text
    [ ] ls = Clipboard.GetText()
    [ ] Clipboard.SetText() // Clear clipboard
    [ ] return ls[3] // Return 3rd line of help text
    [ ]
    [+] else
    [ ] LogTestError()
    [ ] return ""

    </code>
    Matt Gray

  3. #3
    Senior Member
    Join Date
    Dec 2000
    Location
    Pune, India
    Posts
    135
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ho to test “Htm Help” using SilkTest?

    Thanks it is working.

    Can you provide some more help?

    How do I check the topic appearing on screen is the same as I selected?

    I was comparing String against String but there are Case differences.


    ------------------


    [This message has been edited by Prasad (edited 02-14-2002).]

  4. #4
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ho to test “Htm Help” using SilkTest?

    When you want to test strings and don't want case to be an issue, get your string to compare using the "Upper" switch which will convert the whole string to upper case. For example, I have several functions to pull values from an ini file, but I don't know if the end user will type True or true or TRUE or even something as odd as tRuE. I use the Upper switch to convert whatever I get to TRUE or FALSE, then I know what case to compare against.

    Make sense? Look for Upper in the online help.

    ------------------

  5. #5
    Senior Member
    Join Date
    Aug 1999
    Location
    Irvine, CA
    Posts
    157
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ho to test “Htm Help” using SilkTest?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Prasad:
    Thanks it is working.

    Can you provide some more help?

    How do I check the topic appearing on screen is the same as I selected?

    I was comparing String against String but there are Case differences.

    <HR></BLOCKQUOTE>

    Although the help topic text appears in a CustomWin, the left pane of the HTML Help dialog is recognized as a treeview (Help.HHChild1.PageList1.TreeView1). You should be able to use the GetSelText or GetItemText methods to get the text here. DGGrays response about using the Upper function is the way to go after that.


    ------------------
    Matt Gray
    Kofax Image Products
    Matt Gray

  6. #6
    Senior Member
    Join Date
    Dec 2000
    Location
    Pune, India
    Posts
    135
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ho to test “Htm Help” using SilkTest?

    I used MatchStr function. This function looks for a pattern in a string.

    Thanks for your help.

    ------------------

 

 

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:14 AM.

Copyright BetaSoft Inc.