Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

getElementsByClassName help Options
Jumaz
Posted: Monday, November 8, 2021 12:42:54 PM
Rank: Newbie
Groups: Member

Joined: 11/8/2021
Posts: 2
Hi,

I have the following html document in a local file (test.html). The content of the html document is as follows:

Quote:
<body>
<div class="example">
<p>P element in first div with class="example". Div's index is 0.</p>
</div>
<div class="example color">
<p>P element in first div with class="example color". Div's index is 0.</p>
</div>
</body>


i am trying the following code in vb.net but its not working !

Quote:
tmx = modIO.ReadTextFile("E:\test.html")
webview1.LoadHtmlAndWait(tmx)
Dim Classone as String = webview1.EvalScript("document.getElementsByClassName('example')")


Can you help me getting the value value of "example" class innerHTML, outerHTML or string!

Thanks in advance
eo_support
Posted: Monday, November 8, 2021 12:50:14 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 23,102
Hi,

We are not in a position to provide support on JavaScript code for you. You can try to use Google Chrome's Developer Tools' console window to test your JavaScript code. Once you have the correct JavaScript code, you can pass it to EvalScript.

Thanks!
Jumaz
Posted: Monday, November 8, 2021 1:26:46 PM
Rank: Newbie
Groups: Member

Joined: 11/8/2021
Posts: 2
Ok. Thanks for the tip !


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.