Click on input field of web browser ~ Get html element

simpleonline12

New member
Sep 29, 2009
191
3
0
So what I'm trying to do is setup my browser so that when I click an input field like a username, password, etc I would have a screen pop up where I can assign the "id" or "name" of the tag to a variable.

Here is a screenshot of what I am trying to do.

screenshotcs.jpg


I am able to create those pop up boxes using a custom Content Menu Strip.

Here is the code I have behind the context tab:

Code:
Private Sub UsernameToolStripMenuItem_Click(ByVal sender As  System.Object, ByVal e As System.EventArgs) Handles  UsernameToolStripMenuItem.Click
        wbMain.Document.GetElementById("username")


    End Sub

So from the example above what I am trying to accomplish is I want to be able to click on the username field (then the username menu pops up) and I want to assign the "id" or "name" of the element in the html to the variable of "username".

Got any ideas?

Thanks
 


This seems do able. I'd be willing to take a few minutes to figure it out, but why don't you want to scrape the ID from the HTML using a server side language?

Is this part of an automation project and it is easier to stick with just JS?
 
I'm trying to build a profile maker....I want to be able to click on the username field and have the "id" or "name" of the tag link to my variables that I setup.

Username = username.txt
Password = password.txt

When I click on the username input field I will have a list of preset variables pop up in a list...from there I click on the variable that I want to link the input field to. Which in this case if I click on the username input box in my browser for a website...the list appears and I click username from the list and the app know that whatever "id" or "name" of that elelment is will be assigned to the username.txt textbox in my app.