SPONSORS:






User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Senior Member
    Join Date
    Jun 2002
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Anything stronger than OPT_VERIFY_APPREADY?

    I've spent the last couple of months building a suite of scripts to run against our web portal application. I've done the development on a machine running Internet Explorer 5.5, using SilkTest 5.5.3.1[1047], usually testing an installation on Windows 2000 Server. I've known all along that eventually we will want adapted versions that will run on IE5.0, IE6.0, Netscape 4.76, 4.79, and 7.0, and running against Solaris as well. Lots of potential for variation!!

    Anyway, just this week I've begun on the IE5.0 version. The most difficult thing I've found so far is that apparently on IE5.0 SilkTest is not so inclined to wait for the app to finish loading a page as it is with IE5.5 -- so many times already, testcases have bombed out, and I found that if I added a line to Sleep() for 5 or 10 seconds, that was all that was needed. The prospect of going back and adding Sleep() statements all through hundreds of pages of code, wherever there's a call to Click(), is not a happy prospect!

    I've known about the need for Sleep() before. I've used it enough times already in the 5.5 versions. But all along I thought there was an option, OPT_VERIFY_APPREADY=TRUE, that's supposed to take care of that. Up till now it's just been sort of puzzling -- I'm self-taught at SilkTest, and fairly new, too -- why doesn't that option do it all? But now I REALLY want to know what I can do to control Silk and make it wait for pages to load before it goes on.

    Any help would be greatly appreciated



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

  2. #2
    Member
    Join Date
    Oct 2002
    Location
    Alameda, CA
    Posts
    50
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anything stronger than OPT_VERIFY_APPREADY?

    Why not re-write your click event to include a call to Brower.WaitForReady(10).

    Something like this:


    ------------------
    -Josh

    [This message has been edited by VolleyJosh (edited 01-22-2003).]
    -Josh

  3. #3
    Member
    Join Date
    Oct 2002
    Location
    Earth (I think!)
    Posts
    92
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anything stronger than OPT_VERIFY_APPREADY?

    The previous reply leads to designing code to be more adaptable. This implies designing a framework of classes. The framework would contain base classes that you build upon. When something like this occurs (which I also ran into with out AUT), you merely have to modify the base classes (most of the time).

    OO experience is useful to implementing a good dynamic, scalable famework.

    ------------------
    Let go Luke!

  4. #4
    Member
    Join Date
    Oct 2002
    Location
    Alameda, CA
    Posts
    50
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anything stronger than OPT_VERIFY_APPREADY?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by felecha:
    Josh -- rereading your code, it looks like you have it wait BEFORE the click event?

    That's not what I want. I want to click and THEN wait before doing anything else like Verify() -- which fails of course if the object being verified is not up on the screen yet

    <HR></BLOCKQUOTE>
    Sorry, I didn't understand what you wanted- the code should just be a sample.

    Judging from your next reply you've got the right idea. You might try creating your own class name:

    winclass MyhtmlPushButton : HtmlPushButton

    then overriding the method.

    Also, try putting a print before the click too, to make sure it's calling the corect method.




    ------------------
    -Josh
    -Josh

  5. #5
    Senior Member
    Join Date
    Jun 2002
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anything stronger than OPT_VERIFY_APPREADY?

    I'm a little lost here. I still don't know where I should put the code. And if I rename it to myHtmlPushButton, would I not have to then somehow declare all my pushbuttons to be of class myHtmlPushButton. That's the way I would understand it from what I know of inheritance and overriding inherited methods. I have no idea where SilkTest does its instantiations, if I can use the term. I declare my objects in my frame.inc, do I go back in there and change HtmlPushButtons to myHtmlPushButtons?

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

  6. #6
    Member
    Join Date
    Oct 2002
    Location
    Alameda, CA
    Posts
    50
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anything stronger than OPT_VERIFY_APPREADY?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by felecha:
    I'm a little lost here. I still don't know where I should put the code.
    <HR></BLOCKQUOTE>
    In your .inc, or in a seprate file that you include in the .inc

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR> And if I rename it to myHtmlPushButton, would I not have to then somehow declare all my pushbuttons to be of class myHtmlPushButton. That's the way I would understand it from what I know of inheritance and overriding inherited methods. I have no idea where SilkTest does its instantiations, if I can use the term. I declare my objects in my frame.inc, do I go back in there and change HtmlPushButtons to myHtmlPushButtons?

    <HR></BLOCKQUOTE>
    Yes, you would have to do that. Obviously, that's a last-ditch effort. I only suggested it in case nothing else worked (although why what you have doesn't print() isn't clear to me)

    I would try the last thing I suggested- adding a print statement before derived::Click() - before anything else. I should have put that first in my post, not last.



    ------------------
    -Josh
    -Josh

  7. #7
    Senior Member
    Join Date
    Jun 2002
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anything stronger than OPT_VERIFY_APPREADY?

    Well, isn't that fun???!!!

    I did just that, I put into my frame.inc:

    and in the declaration for the Home Page of our portal app I went to the HtmlImage object called "Add Page" and changed its declaration to MyHtmlImage. And finally in my practice testcase I called

    HomePage.TopMenu.AddPage.Click()

    and it clicked the image and printed twice to the results file.

    Cool! So now I gotta think how to put this into use. This will be really valuable.

    Thanks


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

  8. #8
    Member
    Join Date
    Oct 2002
    Location
    Alameda, CA
    Posts
    50
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anything stronger than OPT_VERIFY_APPREADY?

    Did you try the dual Print() statements in the non-renamed class? I would verify that before you go renaming everything. If it doesn't work then the renamed version seems like the way to go.

    ------------------
    -Josh
    -Josh

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

    Re: Anything stronger than OPT_VERIFY_APPREADY?

    Now there's an idea -- build in a wait for every click event?

    On another forum someone suggested WaitForReady(). Reading the Help on that, it sounds like a variation on the Sleep() idea, just that Silk sleeps until it detects the page has finished loading? But isn't that what the OPT_VERIFY_APPREADY option should be doing? To a beginner, the documentation certainly sounds like that.

    As for overloading Click(), would I just put that into the same file where I keep my other custom methods? I have a methods.inc which is linked from my frame.inc declarations file.

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

  10. #10
    Senior Member
    Join Date
    Jun 2002
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anything stronger than OPT_VERIFY_APPREADY?

    Josh -- rereading your code, it looks like you have it wait BEFORE the click event?

    That's not what I want. I want to click and THEN wait before doing anything else like Verify() -- which fails of course if the object being verified is not up on the screen yet

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

 

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

Copyright BetaSoft Inc.