Current time: 12-12-2017, 08:49 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with special SUBMIT-Button
09-08-2012, 07:28 PM (This post was last modified: 09-12-2012 01:09 PM by janrenzlow.)
Post: #1
Problems with special SUBMIT-Button
Your WebpageTest is a powerful tool. I want to test the speed of a browser game. I enter the credentials, but I can not press the button with a script.

I can make the login information to the public. It's just a test account.
http://koeln:pennergame.de
user: schlagbaum
password: mypassword

The source code of the section is:
<div id="login" class="zabsolute">
<form id="loginform" action="/login/check/" method="post">
<fieldset class="zleft-childs">
<label for="login_username">Spieler:</label>
<input id="login_username" class="text" type="text" maxlength="30" name="username">
<label for="password">Passwort:</label>
<input id="password" class="text" type="password" name="password" size="15" maxlength="32">
</fieldset>
<div>
<input class="submit" type="submit" value="Login" name="submitForm">
<a class="forgotten" href="/pw_forgotten/">Passwort vergessen</a>
</div>
</form>
</div>



My script is this
//This works fine
navigate koeln.pennergame.de
setValue name'username schlagbaum
setValue name'password mypassword
// problems from now on
//submitForm name'submitForm
clickAndWait innerText=Login
navigate koeln.pennergame.de/stock/plunder/


I need your help. Thanks in advance
Find all posts by this user
Quote this message in a reply
09-10-2012, 11:47 PM
Post: #2
RE: Problems with special SUBMIT-Button
Try:

Code:
submitForm    id=loginform

You need to act on the form itself, not the submit button (for the submitForm command).

The innerText method on the button wouldn't work as it's the Value that is Login, not text in the html.

You also need a combineSteps or logData 0/1 block since it is a 3-step test (loading the landing page, logging in and going to the target page).
Visit this user's website Find all posts by this user
Quote this message in a reply
09-12-2012, 01:08 PM (This post was last modified: 09-12-2012 01:09 PM by janrenzlow.)
Post: #3
RE: Problems with special SUBMIT-Button
Patrick Thank you for your concise answer. It was a big help. The results are extremely interesting. And the final code looks like this:

combineSteps
navigate koeln.pennergame.de
setValue name'username schlagbaum
setValue name'password mypassword
submitForm id=loginform
navigate koeln.pennergame.de/stock/plunder/
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)