SPONSORS:






User Tag List

Results 1 to 9 of 9
  1. #1
    Senior Member
    Join Date
    Mar 2001
    Posts
    161
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    \"Invalid Handle\" error message.

    User (swatik_2000@yahoo.co.uk) posted:

    Hi all,

    I keep coming across this "Invalid Handle" error message that I can't
    seem to find a way out of.My testcases are data driven and the only
    handle in the script, is the file handle of the input file, that I
    use, to read my data, from.

    However, I can't see what is wrong with the file handle either.That
    is because, this error keeps coming up, only when the same script is
    run over and over again.So, if the input file has 50 records to be
    read, then the script initially does run till it enters about 10
    records.Then, suddenly, it fails, giving me the error.

    When I run the script again without changing anything anywhere, it
    again runs till it enters a couple of records, just to fail yet
    again.If I stop and restart the browser, the script runs for a little
    longer this time.However, that does not stop the error from coming
    again.

    To pin down the problem, I tried debugging the code.In the debug
    mode, when I execute the code, line by line, the error does not
    surface.

    Moreover the line number that comes up in the res file, points to the
    error as having occured in the SetText() function for a TextField.

    If any of you has come across this error before, please let me know.

    Thank you
    Swati


    Post message: silktest@yahoogroups.com
    Subscribe: silktest-subscribe@yahoogroups.com
    Unsubscribe: silktest-unsubscribe@yahoogroups.com
    List owner: silktest-owner@yahoogroups.com
    URL to this page: http://groups.yahoo.com/group/silktest


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



  2. #2
    Member
    Join Date
    Aug 2000
    Location
    Hyderabad,AP,India
    Posts
    80
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: \"Invalid Handle\" error message.

    Hi Swathi,

    I too faced the same problem while I was doing SetPosition (1,1) or SetText ("Baseer")

    I found that the problem was that the field was not completely exposed.....am I right....
    So what I just did...

    BrowserPage.HtmlTextField ("#1").Click (1,5,5)
    BrowserPage.HtmlTextField ("#1").TypeKeys ("Baseer")

    Just try it out.....

    (Note: If I am wrong please correct me all of you...- )

    Baseer

  3. #3
    Junior Member
    Join Date
    May 2001
    Location
    India
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: \"Invalid Handle\" error message.

    Hi,

    Baseer, thanks for replying.I think you seem to have gotten the hang of the problem I talked of.

    Yes, I did try out the code you sent across, but it could not prevent the code from failing.The error occured again after a few runs of the code.

    The textfield is exposed all the while.

    Actually, in my case,there is a value typed into the text field initially.After that the code performs a few actions on certain other objects and then gets back to type in a new value into the textfield.All through this process, the text field is exposed.However, it contains the earlier value that I had typed in.When I want to now type in the new value, I get this error.

    I do not get the error very time I want to change the value in the text field.I get it off and on.I have tried clearing teh textfield using the clearText() function.

    So, I am still stuck with the error.It would be great,if anybody could help.

    Thanks
    Swati

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

    Re: \"Invalid Handle\" error message.

    How are you getting the data for your data driven testcases?

    We had a problem the other day with not releasing the memory used with executing a FetchNext and it caused the same king of problem.

    Mike

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

  5. #5
    Junior Member
    Join Date
    May 2001
    Location
    India
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: \"Invalid Handle\" error message.

    Hey Mike,

    I am reading my data off a text file.I am not using a "Fetch Next".I am using a File Read.
    The point is that I am getting the error for a SetText() function.

    I did recieve a few inputs on that but none of them have worked so far.I would like to know how you got out of your problem though.

    Swati

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

  6. #6
    Member
    Join Date
    Nov 2000
    Location
    Tampa, FL USA
    Posts
    90
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: \"Invalid Handle\" error message.

    Is it possible that your textfield has multiple lines? Perhaps you can check the IsMulti property to verify if it is, and clear it out using the SetMultiText method.

    just a thought....

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

  7. #7
    Senior Member
    Join Date
    Sep 2000
    Location
    Twin Cities, MN, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: \"Invalid Handle\" error message.

    When you say you are entering multiple records, are you in a position at any time during that to close your browser and start over? You had mentioned that you were able to close your browser and restart in order to get things working again. SilkTest doesn't like long user sessions. If you can, you should be able to keep the file open and loop through your record entries.
    It might also help to switch to a query-based data driven testcase, where you close the file after retrieving the data you need until the next loop.

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

  8. #8
    Junior Member
    Join Date
    May 2001
    Location
    Beaverton
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: \"Invalid Handle\" error message.

    Hi,

    I don't have any clue of your Browser settings. Probably, your browser might have been experiencing the Cache problem. You mentioned as when you close and open the browser then it runs better for a while. With the above clue I could guess...

    Try this, it might work.

    browser.ClearCache ( )


    Krishna.

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

  9. #9
    Junior Member
    Join Date
    May 2001
    Location
    India
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: \"Invalid Handle\" error message.

    Hi,

    Krishna, you seem to have hit "Bullís-eye" with the BrowserPage.ClearCache suggestion.I did not get the error after I included this piece in my code.You were right.It was probably the browser that was the problem.

    Thanks everyone for all the help.

    Swati

 

 

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 03:47 AM.

Copyright BetaSoft Inc.