0

Cannot InvokeMember on HTML Page

I have a VB Net application that I have been running for over a year to login to a specific website

Heritage Coins & Currency

The page I'm now unable to loging is --> https://coins.ha.com/c/login.zx

I am setting the text boxes as follows:

WB1.Document.All("emailAddress").SetAttribute("Value", "sge")
  WB1.Document.All("password").SetAttribute("Value", "7476")

Even though these values do actually display on the screen when I do GetAttribute I see that I have set the values.

 ?WB1.Document.All("emailAddress").getAttribute("Value")
"sge"
  ?WB1.Document.All("password").getAttribute("Value")
"7476"

When i do InvokeMember as follows NOTHING HAPPENS and I receive no msgs

WB1.Document.GetElementById("loginButton").InvokeMember("click") 

The HTML code smippet is:

<input id="loginButton" name="loginButton" value="Sign-In" type="submit" tabindex="3">  
  <input name="source" type="hidden" value="" />
  <input name="forceLogin" type="hidden" value="" />

  <input name="loginAction" value="log-in" type="hidden">

I am an inexperienced Net programmer and I do not have a clue how to resolve

thanks
sandy

3
Contributors
4
Replies
6
Views
4 Years
Discussion Span
Last Post by TnTinMN
0

Is it possible that the site has been updated and the login form, associated controls and code behind it have been changed?

0

"Is it possible that the site has been updated and the login form, associated controls and code behind it have been changed?"

NO. THis is consistently recurring over several days

0

If the login form had been changed a couple of days ago then it WOULD consistanly occur since the change. i.e. everytime.

Do YOU have full control over the site you are trying to log into? In other words, can you guarentee no one has changed the web site or its login page?

0

Sandy,

First off, change the password on that account immediately and cancel your credit card.

I know very little about this topic, but:

Dim em1 As HtmlElement = wb1.Document.All("emailAddress")
'returns ID: "login-Email_Address" 

Dim pw As HtmlElement = wb1.Document.All("password")
'returns ID: "login-password"

These are not the ID's you wanted.

This does work though:

Dim inputs As HtmlElementCollection = wb1.Document.GetElementsByTagName("INPUT")
Dim emSet, pwSet As Boolean
For Each el As HtmlElement In inputs
   Select Case el.Id
      Case "emailAddress"
         el.SetAttribute("Value", "sge")
         emSet = True
      Case "password"
         el.SetAttribute("Value", "7476")
         pwSet = True
   End Select
   If emSet And pwSet Then Exit For
Next
wb1.Document.GetElementById("loginButton").InvokeMember("click")
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.