|
Rank: Newbie Groups: Member
Joined: 11/22/2015 Posts: 6
|
String name = "myAcc"; String pass = "myPass"; EO.WebBrowser.DOM.Document doc = WebView1.GetDOMWindow().document; doc.getElementById("username").innerText = name; doc.getElementById("password").innerText = pass;
it's not work...innerText ReadOnly somebody help please
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
You can use WebView1.EvalScript("document.getElementById('username').innerText = 'user_name'") instead.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 11/22/2015 Posts: 6
|
WebView1.EvalScript("document.getElementById('username').innerText = 'user_name'") it's not work My version EO.Total.2015.3.24.0
I try this, it's work WebView1.GetDOMWindow.document.getElementById("username").Item("value") = myAcc
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
EvalScript is the preferred way and it should work with any valid JavaScript code. If it doesn't work, then something is wrong with the JavaScript code you passed to it.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 11/22/2015 Posts: 6
|
it's my code WebView1.EvalScript("document.getElementById('txtUsername').innerText = 'evan4736'"); WebView1.EvalScript("document.getElementById('txtPassword').innerText = 'pass4736'");
txtUsername is username ElementId txtPassword is password ElementId evan4736 is My username pass4736 is My password still not work
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
I am not sure what else I can tell you. You can run our TabbedBrowser sample, then click "Console" in the drop down menu to open the console panel, then type whatever script you want to run there and hit enter. That will call EvalScript on the line you entered. If an error occurred while running the script, you will see an error message. You can do the same in Google Chrome browser's JavaScript console. That should help you find out what's wrong with your script.
Thanks!
|
|