SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    MB
    MB is offline
    Junior Member
    Join Date
    Apr 2000
    Location
    Austin, TX USA
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hidden HTML in Javascript

    I am having trouble getting the login for my app to work because, my developer says, I am not passing the browser.

    I told him that I don't have to using SILK because Silk does not see any hidden fields in my window declaration. I was told that the browser wants
    <INPUT TYPE = "hidden" NAME = "X" VALUE= "0">

    Any ideas as to what I can do and how I can do it.

  2. #2
    AJ
    AJ is offline
    Moderator AJ's Avatar
    Join Date
    Jun 1999
    Location
    San Jose, CA
    Posts
    1,691
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hidden HTML in Javascript

    I recommend writing a function to parse out all hidden fields from your doc...

    If I had the time I would

    What you need to do is open the source html into a long list of string, then parse out into another list all the hidden fields.

    Sounds simple right?? (yeah right)

    ------------------
    AJ Alhait
    BetaSoft Inc.
    AJ Alhait
    BetaSoft Inc.

  3. #3
    MB
    MB is offline
    Junior Member
    Join Date
    Apr 2000
    Location
    Austin, TX USA
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hidden HTML in Javascript

    So let's say I do that, then what do I do with the hidden parameters?

  4. #4
    AJ
    AJ is offline
    Moderator AJ's Avatar
    Join Date
    Jun 1999
    Location
    San Jose, CA
    Posts
    1,691
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hidden HTML in Javascript

    The question to ask the developer is why you need to know the hidden fields to login??

    If you load a browser page that has a username and a password, and you type those in, then click login, shouldn't the browser page already have the hidden fields in it?

    The only situation I see where you need to parse those out is in Performer, not SilkTest.

    ------------------
    AJ Alhait
    BetaSoft Inc.
    AJ Alhait
    BetaSoft Inc.

  5. #5
    MB
    MB is offline
    Junior Member
    Join Date
    Apr 2000
    Location
    Austin, TX USA
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hidden HTML in Javascript

    Exactly the conversation that I had with the developer before I posted this. The developer stated that I was getting the 500 Internal Server Error using SilkTest because I was not passing the "HIDDEN" fields. However, if I did the same login manually, I did not get the 500 error, therefore I posted this.

  6. #6
    Senior Member
    Join Date
    Jul 2002
    Location
    Paris (France)
    Posts
    182
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hidden HTML in Javascript

    Strange issue...

    Can you load the page with Silk, then manaully check if the hidden fields are there? It could be that some other page is loaded, then your redirected to the login page that has these fields. If your script is just calling the login page, it may not have the correct hidden fields.

    So, if you can load the page with Silk, stop the script and look at the HTML source code. If the code is the same as it is when you do it manually, and the URL is exactly the same, then the developer is full of air (things happen).

    Now, if they are diffrent, then your Silk script needs to do something diffrently. You would be doing some process or steps that you are not doing with the script. Make the manual and automated methods match.

    Hopefully this makes sense.

    I do like AJ's idea on a HTML parser for 4Test. If I had the time I would make one, since that in itself could be a handy tool, but I don't think that is the answer to your problem.


    ------------------
    David Genrich
    Icarian
    555 North Mathilda Ave
    Sunnyvale, CA 94086
    davidg@icarian.com

  7. #7
    MB
    MB is offline
    Junior Member
    Join Date
    Apr 2000
    Location
    Austin, TX USA
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hidden HTML in Javascript

    This is the line that ended up working for me:
    Browser.Location.TypeKeys ("http://localhost/servlet/SvtAllLoginHandler?Login={sID}&Password={sPW}&Brow ser={sBrowser}")

    I pass the browser in using sBrowser (either "explorer" or "netscape").

    Hope this helps someone else out.

    Thanks for everyone's help!

 

 

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

Copyright BetaSoft Inc.