Get alert content when alert is shown

eyelashesnow

New Member
I have an HTML page with this script:\[code\]<Script>function Run(){alert("The Content Here");return true;}</script><button onclick="Run();">I Want It Now</button>\[/code\]Lets say that I opened this page with firefox or Chrome. And lets say that I clicked on the button "I Want It Now" and the page shows me the alert:\[code\]The Content Here\[/code\]How can I insert the alert content into a string in my VB.NET project? I know that I can use the alert window handle to get the label handle and then extract (grab) the text of the alert, but I don't think that this is the best way to do it. Is there another way to pass (or get) information from the page (not from webbrowser control or by using webClient.DownloadString) into my VB.NET (or C#) project?
 
Back
Top