SPONSORS:






User Tag List

Results 1 to 10 of 10
  1. #1
    Junior Member
    Join Date
    Jul 2002
    Location
    Columbia, MO, USA
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Copy contents of Web Page?

    I am trying to run a test where I capture the data on a web page and copy that data to a file for later comparison. I can't get Silktest to recognize the contents in the SaveAs dialog box. Has anyone ever accomplished what I am trying to do? Any suggestions would be appreciated. Thanks!
    Jill Vannausdle

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Location
    Sunyyvale CA USA
    Posts
    422
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Copy contents of Web Page?

    Looks like u wanna work with Save As dialog box of IE, Am I right? Please be specific.

    ------------------
    Sree
    Sree

  3. #3
    Junior Member
    Join Date
    Jul 2002
    Location
    Columbia, MO, USA
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Copy contents of Web Page?

    It doesn't really matter I guess how I do it as long as I can copy the contents to a file. If I could get Silktest to recognize the items in the popup lists that would be great. So, if you know how to use the IE SaveAs dialog box that would be great.
    Jill Vannausdle

  4. #4
    Senior Member
    Join Date
    May 2002
    Posts
    448
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Copy contents of Web Page?

    Two ways to go about it....

    1. Assuming that SilkTest identifies the popuplist in the SaveaAs dialogbox, try SaveAs.SaveAsType_PopUpList.Select ("Web Page, complete (*.htm, *.html)"). Meaning pass the exact string as seen in the Popuplist. Silktest resolves this at runtime. It has worked for us in the past. The best thing to do is Record > Actions and reproduce the exact steps you want to be done. Then copy paste the String (item from the PopupList) from the code onto your script.

    2. Try passing the index of the PopupList item to the Select method as a parameter. Something like SaveAs.SaveAsType_PopUpList.Select (2) or SaveAs.SaveAsType_PopUpList.Select ("#2")

    ------------------
    never say die
    Life, that dares send, A challenge to his end,
    And when it comes say, Welcome friend.

  5. #5
    Junior Member
    Join Date
    Nov 2000
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Copy contents of Web Page?

    If you are trying to grab the HTML source...SilkTest has a built-in function called GetPageSource()...returns a List of String...however this function has problems when the source is long...actually truncates some of the source.

    If this is what you are after...than look at this post
    http://www.qaforums.com/Forum1/HTML/003850.html



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

  6. #6
    Senior Member
    Join Date
    Jun 2000
    Location
    Sunyyvale CA USA
    Posts
    422
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Copy contents of Web Page?

    I could recognize Save As dialog box of IE. What browser u r using?

    ------------------
    Sree
    Sree

  7. #7
    Junior Member
    Join Date
    Aug 2002
    Location
    Cupertino, CA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Copy contents of Web Page?

    Here you go.
    Some tricks.
    See attachment. Easyest way.

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

  8. #8
    Junior Member
    Join Date
    Aug 2002
    Location
    Cupertino, CA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Copy contents of Web Page?

    Sorry forgot one line.

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


    [This message has been edited by Lepricon (edited 08-24-2002).]

    [This message has been edited by Lepricon (edited 08-24-2002).]

  9. #9
    Senior Member
    Join Date
    May 2002
    Posts
    448
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Copy contents of Web Page?

    Shelby,

    Is SilkTest not recgonizing the contents of the SaveAs dialog or the contents of the Popuplist that has to the option to save the page as a WebPage ?

    Well in first case any of the solutions provided above wont work, you will then have to write your own methods, try using Class Map or find out the cause as to why SilkTest does not recognise the contents (Since if the browser you are using is IE and others could).

    In the second case of course you could try to handle it Rick Oei has mentioned above or maybe the method that I have suggested. Also you could try out as Lepricon says, however this type of approach has lots of drawbacks if you are creating scripts for long term use.
    Some of the problems in using the Keyboard method can be the "Enter" in the method does not always result in the selection in the popuplist. Also the tab order of the dialogbox may not remain same in future. If at all this method needs to be used make sure you use keypresses like Home End etc before you start tabbing through the options.

    ------------------
    never say die
    Life, that dares send, A challenge to his end,
    And when it comes say, Welcome friend.

  10. #10
    Senior Member
    Join Date
    Nov 2000
    Location
    Bloomington, IL
    Posts
    142
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Copy contents of Web Page?

    Here is how I do it.

    [ ] SaveAs.SetActive () //Set the Save As dialog window active
    [ ] //************************************************** ************************************************** ******
    [ ] //* I had to add the next line because SilkTest could not always see the D_drive designaion in the window.
    [ ] //* Adding the Desktop line made sure that d_drive could always be seen.
    [ ] //************************************************** ************************************************** ******
    [ ] SaveAs.SaveIn1.Select ("Desktop") //Choose Desktop from the Save In drop-down box
    [ ] SaveAs.SaveIn1.Select ("D_drive (D ") //Choose d_Drive (D from the Save In drop-down box
    [ ] //************************************************** ************************************************** ******
    [ ] //* The next 5 lines of code may need to be changed for your application depending on where you want to
    [ ] //* save the created html file. You may also want to add or subtract lines depending on how deep you want
    [ ] //* to store them
    [ ] //************************************************** ************************************************** ******
    [ ] SaveAs.SaveIn2.DoubleSelect ("Apps") //Click the directory specified
    [ ] SaveAs.SaveIn2.DoubleSelect ("Silk") //Click the directory specified
    [ ] SaveAs.SaveIn2.DoubleSelect ("Save") //Click the directory specified
    [ ] SaveAs.SaveIn2.DoubleSelect ("Screen") //Click the directory specified
    [ ] SaveAs.SaveIn2.DoubleSelect ("ScreenCapture") //Click the directory specified
    [ ] SaveAs.FileName.SetText (sFName + ".htm") //Fill in the file name with .htm concatenated on the end
    [ ] SaveAs.Save.Click () //Click the Save button
    [ ] //************************************************** ************************************************** ******

    All I did was to capture the window declarations for the SaveAs window and this code has worked for 10 - 15 different applications and screen types.

    Please let me know if this helps,

    MikeF

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


    [This message has been edited by MikeF (edited 08-26-2002).]

 

 

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 06:01 AM.

Copyright BetaSoft Inc.