WebPagetest Forums

Full Version: Does className matching happen across all browsers?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello There,

This is my first post to the forum. WPT is awesome, Thanks a bunch for this pmeenan!

The question I have is that for some reason my login script works only on IE7-9 but does not work when I select Firefox or Chrome.

The following is the script I use:

navigate <protect the innocent>
setValue username <some_user_name>
setValue password <pass>
submitForm className=login-form

Is there any known issues with submitForm interacting with the className on non-IE browsers?
Could you use submitForm name instead of submitForm className?
(01-09-2013 06:25 AM)andydavies Wrote: [ -> ]Could you use submitForm name instead of submitForm className?

I tried that (submitForm name) first and it would not work even on IE.

Maybe something to do with the form. The HTML in question that I am trying to script looks as

-
<form class="login-form" method="post" action="/Account.mvc/LogIn">
<fieldset class="fields">
<label for="username">Username</label>
<input type="text" name="username" value="" autofocus=""/>

<label for="password">Password</label>
<input name="password" type="password"/>

<input name="RememberMe" type="checkbox" value="true"/>
<label for="RememberMe" class="checkbox-field">Remember Me</label>

<button type="submit">Login</button>
<input type="hidden" name="Destination" value=""/>
</fieldset>
</form>
--
The reason submitForm name doesn't work is the form doesn't have a name - do you have access to the code to fix this?
(01-10-2013 07:18 AM)andydavies Wrote: [ -> ]The reason submitForm name doesn't work is the form doesn't have a name - do you have access to the code to fix this?

@andydavies: Thanks a bunch for your help on this.

Unfortunately I am a proxy guy and this is for a prospect of mine. I can ask them but its gonna take a while and strongly prefer if there is a way we can automate the login via WPT.
I'll be looking at the scripting support a bit next week, but if all else fails, exec and execAndWait are your friends. You can use javascript to manipulate the form and you can debug it locally in your dev tools to make sure it works before submitting it.
Reference URL's