So I'm trying to click on this button on a website which doesnt have a ID, the only relevant thing it has is a class name. It's located inside this one div but i'm not sure if that matters.
nothing at all happends when I try to execute the code from my button event. Why is that?
This is what I've tried so far. (I've tried multiple different options but none seem to work)
HtmlElementCollection classButton = wbMain.Document.All;
foreach (HtmlElement element in classButton)
{
if (element.GetAttribute("class") == "media-menu-item")
{
while (true)
{
element.InvokeMember("click");
}
}
}