Not able to setvalue for the text field which has multiple layer(i.e. HTML5 page)
|
08-27-2014, 05:26 AM
Post: #1
|
|||
|
|||
Not able to setvalue for the text field which has multiple layer(i.e. HTML5 page)
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 |
|||
08-27-2014, 06:29 PM
Post: #2
|
|||
|
|||
RE: Not able to setvalue for the text field which has multiple layer(i.e. HTML5 page)
Try execAndWait document.getElementById("register-email").value="xxx@x.com"; or some similar variation
Andy Using WebPageTest - http://usingwpt.com/ |
|||
08-30-2014, 03:06 AM
(This post was last modified: 08-30-2014 04:03 AM by adula.rajkumar@gmail.com.)
Post: #3
|
|||
|
|||
RE: Not able to setvalue for the text field which has multiple layer(i.e. HTML5 page)
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 |
|||
08-30-2014, 08:15 PM
(This post was last modified: 08-30-2014 08:31 PM by andydavies.)
Post: #4
|
|||
|
|||
RE: Not able to setvalue for the text field which has multiple layer(i.e. HTML5 page)
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 Andy Using WebPageTest - http://usingwpt.com/ |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)