I am trying to randomly Click/Navigate to a URL in my browser after the page is finished loading. I'm fairly new to C# and GeckoFX, I'm guessing the steps should be;
- Collect urls from the loaded page
- Check if they are in href and starting with http
- Navigate to a random selection from the result
So far I can get the urls but I dont know what to do next;
private void LoadingFinished(object sender, EventArgs args)
{
foreach (GeckoElement htmlElement in geckoWebBrowser1.Document.Links)
{
string linkItem = htmlElement.GetAttribute("href").ToString();
}
}
You could try the following