WebPagetest Forums

Full Version: Not able to setvalue for the text field which has multiple layer(i.e. HTML5 page)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am not able to setvalue for the text field which has multiple layer(i.e. HTML5 page) following are the attribute set for that text filed


below is the text field tag :
<input id="register-email" type="text" value="Email Address" name="EmailAddress" placeholder="Email Address" autocomplete="off" >

tried below
setValue name=EmailAddress xxx@x.com
setValue id=register-email xxx@x.com
setValue placeholder=Email Address xxx@x.com

could you please suggest how to setValue ?

Thanks
Raj
Try execAndWait document.getElementById("register-email").value="xxx@x.com"; or some similar variation
Thank you Andydavies its working

got one more issue

Not able to click the button which has placed on multiple layers(same page which was mentioned above), below are the attributes

<a class="button-submit" href="jsubmitAction()">Submit</a>

can anyone help me out to click this button ?

when used clickAndWait className=button-submit its not performing click operation
When used submitForm , form submitted with "null" values

Thanks in Advance
Rajkumar
You can do a similar thing for that too e.g.

execAndWait document.getElementsByClassName("button-submit")[0].click();

obviously you'll need to adjust the index if there's more than one element with that class

I tend to write WPT scripts by testing the DOM code from a browser's dev tools console and then use execAndWait in WPT
Reference URL's