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.

my problem

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(&quot;btnlogin&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, 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

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -