SPONSORS:






User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Member
    Join Date
    Feb 2003
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Force Page Re-Capture

    Hi All,

    I have a problem while testing on a web application. If I click on a radio button that causes a page reload (slightly different from the page before the reload), SilkTest does not re-capture the page definition. This way I can't recognize any new content that belongs to the reloaded page.

    I've tried to visit another page and come back to *this* page but it doesn't lead to a re-capture either. It's a weird problem but does anyone know how to force a page definition re-capture in 4Test?

    Thanks.

    David


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

  2. #2
    Member
    Join Date
    Sep 2001
    Posts
    69
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Force Page Re-Capture

    Try using the GenrateDecl method. It might help with this issue.

    window.GenerateDecl ( )

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

  3. #3
    Senior Member
    Join Date
    Aug 2000
    Location
    NY,NY,USA
    Posts
    103
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Force Page Re-Capture

    Still lurking I see Joe, are you still in CT

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

  4. #4
    Member
    Join Date
    Feb 2003
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Force Page Re-Capture

    Thanks for your help. However, I've realized that window.GenerateDecl () returns a string list containing the page definition in text. That's not what I want because not only I have to verify the existence of the text I also need to click on a link to proceed.

    I've also tried to call Browser.FlushCache() just before I enter this page again but that doesn't work either.

    Any other suggestions? Thank you very much.

    David

  5. #5
    Member
    Join Date
    Sep 2001
    Posts
    69
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Force Page Re-Capture

    Hummm ... I am Joe_v not JoeV, I think that's the guy you are looking for. We have very similar user names.





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

  6. #6
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Force Page Re-Capture

    No definitive answer here, but there was a post quite some time back that suggested changing input focus to some other application and returning could (at the time) force a reinventory of the original page.

    A GetContents()or GetContents(TRUE), or GetChildren() call might also have the same result.

    Something to try anyway...


    John


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

  7. #7
    Senior Member
    Join Date
    Aug 2000
    Location
    NY,NY,USA
    Posts
    103
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Force Page Re-Capture

    Sorry Joe, you are correct

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

  8. #8
    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: Force Page Re-Capture

    Not completely clear on what you are attempting. Does Silk see the reloaded page as the same page, but just with different controls?

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

  9. #9
    Junior Member
    Join Date
    Aug 2001
    Location
    United Kingdom
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Force Page Re-Capture

    We've had similar problems in the past.
    We have partially solved this by moving the window by a few pixels, then checking to see if an expected control exists.
    It seems that moving the position of the window on the desktop causes Silk Test to refresh what it "sees".
    Having your windows dancing around the screen like this may make you a little seasick but you're not supposed to sit and watch really are you?

  10. #10
    Member
    Join Date
    Feb 2003
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Force Page Re-Capture

    Thank you all for your help. I finally found a solution to the problem I had described. But first let me clarify on the situation I was facing again. Hopefully this is helpful to everyone who happens to read this thread.

    I have a page that allows me to add some data to be displayed in a list at the bottom of the page. Imagine something similar to the google search result page. Suppose as I first enter the page I have 1 search result. I then add another entry and click a "Submit" button. Now I see the newly added entry showing just below the first entry, in the same page. I have 2 entries now.

    Now I need to get SilkTest to recognize a link in the 2nd entry. SilkTest DOES NOT FIND IT! That's the problem.

    I made an educated guess that SilkTest simply re-read the page definition from its cache since the page name is the same and the object hierarchy is similar. The strange thing is that when I go to another page and then return to this page (not by browser back and forward, but with actual links), I still don't see the second entry. Now things are getting strange.

    Anyhow, I've tried several things but nothing works. I was finally able to recognize the controls in the second entry by doing something like this:

    window wChild = this.tblT1.HtmlColumn2.HtmlLink ("Entry2")

    - "this" is the current window.
    - "tblT1.HtmlColumn2" gets me to the location for entry 1 and entry 2, both containing HtmlLink objects.
    - By using ...HtmlLink ("Entry2"), we get a return value in the type of "window".

    Then we check if the window obj wChild is null. If not null, then we've located the link control in Entry2. If null, then that link does not exist.

    This is how I was able to force SilkTest to dynamically read the page definition. Hopefully, this painful experience could be less painful for others in the future after reading this thread.

    Once again, than you all for your help. It's great to see a community of people very willingly to assist each other.

    David

 

 
Page 1 of 2 12 LastLast

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 05:35 AM.

Copyright BetaSoft Inc.