C # Visual Studio 2010
I am loading a complex html page into a webbrowser control. But I do not have the ability to change the web page. I want to click a link on a page automatically from a window form. But the identifier is created randomly every time the page is loaded (so I believe that the link to the ID will not work).
This is the contents of the href link:
<a
id="u_lp_id_58547" href="javascript:void(0)" class="SGLeftPanelText" onclick="setStoreParams('cases;212', 212); window.leftpanel.onClick('cases_ss_733');return false; ">
My Assigned</a>
Anyway, click the link from C #?
Thanks!
UPDATE:
It seems to me that this is close, but it just does not work:
HtmlElementCollection links = helpdeskWebBrowser.Document.Window.Frames["main_pending_events_frame"].Document.GetElementsByTagName("a"); MessageBox.Show(links.Count.ToString());
I tried connecting every frame name and tried both "a" and "A" in the TagName field, but just no luck. I can not find any links; the message field is always 0. What am I missing?
c # browser visual-studio-2010 hyperlink
Josh
source share