Welcome Guest Search | Active Topics | Sign In | Register

EO.Webbrowser innerText ReadOnly Options
Evan
Posted: Sunday, November 22, 2015 10:02:27 AM
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
eo_support
Posted: Sunday, November 22, 2015 1:30:05 PM
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!
Evan
Posted: Sunday, November 22, 2015 1:47:28 PM
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
eo_support
Posted: Sunday, November 22, 2015 4:55:28 PM
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!
Evan
Posted: Sunday, November 22, 2015 5:18:59 PM
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
eo_support
Posted: Sunday, November 22, 2015 7:53:22 PM
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!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.