Hello All
I am trying to save a html table from a website to a .csv file.
However, I have issues invoking an element. I have managed to login into the site, but cannot work out how to invoke a element (it is just text - no button).
My VB code is (I have asterixed the username and password - but I can assure you its working) :
I cannot invoke the text (ID is f10_linkThreeButton) with WebBrowser1.Document.Forms(0).InvokeMember("f10_linkThreeButton").Code:Public Class Form1 Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click WebBrowser1.Navigate("https://csonline.eskom.co.za") End Sub Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click WebBrowser1.Document.GetElementById("accountNumber").SetAttribute("value", "********") WebBrowser1.Document.GetElementById("accountPassword").SetAttribute("value", "*******") WebBrowser1.Document.Forms(0).InvokeMember("submit") WebBrowser1.Document.Forms(0).InvokeMember("f10_linkThreeButton") End Sub End Class
The inspect element from the website is :
Code:<a href="javascript:void(0);" style="" id="f10_linkThreeButton" class="GTHREFButton linkThreeButton quickLinks GTTextButtonH GTVI GTTextFieldAC " onfocus="gainFocus('f10_linkThreeButton');" onblur="looseFocus();" onclick="clientAPI.postEvent('f10_linkThreeButton',4);return false;" tabindex="-1" title="View your consumption history.">View Consumption History</a>
Any help would be much appreciated.
Regards




Reply With Quote
