SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Sep 2000
    Posts
    159
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HtmlTextField.SetText not working

    I am using IE5 with DOM.

    HtmlTextField("#1").SetText does not enter
    any text.

    If I use HtmlTextField("#1").TypeKeys,
    it works OK.

    What could be wrong?



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

  2. #2
    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: HtmlTextField.SetText not working

    How fast is your machine? I had similar problems with a testcase recently. It turned out the PC was going too fast for it's own good. I set a keyboard event delay (Options>Agent - Timing tab) to slow things down a bit and everything worked fine.
    GodKnows has a good point too. I wrote my own function, called SetVerifyText, that 1) Sets the focus to the specified TextField 2) Enters the specified text 3) Verifies that the text now in the HtmlTextField matches the specified text, and if it doesn't, go back to 1.
    I vaguely remember what prompted me to write a function like that, but I do know part of it dealt with setting the focus first.

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

  3. #3
    Member
    Join Date
    Jan 2001
    Posts
    33
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: HtmlTextField.SetText not working

    I've seen this several times while running tests on Windows 98. I never did solve the problem -- the same script would run on some Win98 boxes, on others it just wouldn't put the text in there.

    My workaround was leveraging the code from page 323 of the SilkTest User's Guide.

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

  4. #4
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: HtmlTextField.SetText not working

    Try to do a focus on the control before hand just in case.

    Can you try to use the same function using VO extention? It might be something with the DOM extention.

    Seriously I don't see anything wrong with your code.

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

  5. #5
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: HtmlTextField.SetText not working

    Just to add to my previous mesg:

    Add modify the second line to :


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

  6. #6
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: HtmlTextField.SetText not working

    To see what objects are on the screen:

    Print (BrowserPage.GetChildren ())

    See if the text field appears.

    Try using "Record Window Identifiers" to get a valid identifier for the object. Then add SetText ("abc") to to the identifer.

    The Text Field may be in an HtmlTable.

    Set your DOMEX.INI BorderlessTable setting to 0.

    Hope this helps.


    ------------------
    John W Green
    jwgreen@automationexpertise.com
    http://www.automationexpertise.com

 

 

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 07:19 AM.

Copyright BetaSoft Inc.