Hello, newbie here.
So, I want to make a program, which will open up a website with GeckoWebBrowser. There in that website is a text box, and I want to insert a text into that text box.
For instance, on a classic web browser I would do this:
WebBrowser1.Document.GetElementById("word").InnerText = "gehen"
Now, I would like to do the same thing in GeckoWebBrowser, but the problem is that it doesn't seem to have the innerText control.
Here is the part of the html code:
<pre><pre><input id="word" class="input_style ui-autocomplete-input" type="text" maxlength="50">
And the link to the website for the better view:
https://www.dict.com/German-English
What I have tried:
Here's what I've tried...
1st try:
GeckoWebBrowser1.Document.GetElementById("word").TextContent = "gehen"
2nd try:
GeckoWebBrowser1.Document.GetElementById("word").SetAttribute("text", "gehen")
3rd try:
What I got from some forum:
Dim myElement As Gecko.GeckoHtmlElement = Nothing
Dim myDoc As Gecko.GeckoDocument = GeckoWebBrowser1.Window.Document
myElement = myDoc.GetHtmlElementById("word")
If myElement IsNot Nothing Then
myElement.InnerHtml = "gehen"
End If
And that's about it. I've been trying this for a whole week, but I just don't seem to find an answer to my question. I've searched on different forums, I might as well have searched the whole web, but no luck.
I really hope you can help, and thank you very, very much for it.
May the rest of your day be as amazing as the taste of a chocolate :)