jquery - Editing value in JavaScript through phantomJS not Working -
i using phantomjs execute js code on webpage automate script me, in example trying login through webpage. kinda not ordinary web logins, uses js submit button not form.
so anyways here problem facing.
as can see. submited page. problem can see values of username , passwords not added webpage. using this:
document.getelementbyid("txtusername").vlaue="plaplapla"; document.getelementbyid("txtpassword").vlaue="plapalpla";
html code login :
<a id="btnlogin" href="javascript:webform_dopostbackwithoptions(new webform_postbackoptions("btnlogin", "", true, "", "", false, true))"><b>login</b></a>
html code username , password :
<input name="txtusername" type="text" id="txtusername" style="width:190px;" /><br> <input name="txtpassword" type="password" id="txtpassword" style="width:190px;" /><br>
also, have no access html change it. using js work.
any ideas ?
try
document.getelementbyid("txtusername").value="plaplapla"; document.getelementbyid("txtpassword").value="plapalpla"; //add line alert("hello!");
to test this, code has been executed
Comments
Post a Comment