Automate html elements in WebBrowser (VBWebBrowserAutomation)

The code sample shows how to automate HTML elements loaded in WebBrowser control

VB.NET (62.0 KB)
 
 
 
 
 
4.5 Star
(2)
10,080 times
Add to favorites
7/13/2011
E-mail Twitter del.icio.us Digg Facebook
<?xml version="1.0"?>
<StoredSite xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Host>www.codeplex.com</Host>
  <Urls>
    <string>/site/login</string> 
    <string>/site/users/update</string>
  </Urls>
  <InputElements>
    <HtmlInputElement xsi:type="HtmlText">
      <ID>UserName</ID>
      <Value>onecodetest</Value>
    </HtmlInputElement>
    <HtmlInputElement xsi:type="HtmlPassword">
      <ID>Password</ID>
      <Value>Password01!</Value>
    </HtmlInputElement>
    <HtmlInputElement xsi:type="HtmlCheckBox">
      <ID>remember</ID>
      <Checked>true</Checked>
    </HtmlInputElement>
    <HtmlInputElement xsi:type="HtmlSubmit">
      <ID>loginButton</ID>
    </HtmlInputElement>
    <HtmlInputElement xsi:type="HtmlText">
      <ID>EmailAddressForChange</ID>
      <Value>yourname@hotmail.com</Value>
    </HtmlInputElement>
  </InputElements>
</StoredSite>