Merhaba Twitter için bir program yapıyorum. Yapmak istediğim şu twitter'da mesela takipedenitakipederim url yoluna gidiyorum webbrowser ile sonra ordaki tweet atanları takip etmeye çalışıyorum. Kod bloğumda bir kısmak kadar çalışıyor. Direkt orada takip et kısmı yok o yüzden kullanıcı adına tıklattırıp popup pencere açılıyor ama orda takipet kısmına bastıramıyorum. Kodlarım aşağıdaki gibi :


 HtmlElementCollection col = webBrowser1.Document.GetElementsByTagName("strong");
            foreach (HtmlElement doc in col)
            {
                doc.InvokeMember("click");
                HtmlElementCollection col2 = webBrowser1.Document.GetElementsByTagName("h3");
                foreach (HtmlElement doc2 in col2)
                {
                    string x = doc.GetAttribute("class").ToString();
                    if (x == "modal-title")
                    {
                        MessageBox.Show("a");
                        //<span class="button-text follow-text">Takip et <i class="follow"></i></span>
                        HtmlElementCollection col3 = webBrowser1.Document.GetElementsByTagName("span");
                        foreach (HtmlElement doc3 in col3)
                        {
                            
                            string classCek = doc.GetAttribute("class").ToString();
                            if (classCek == "button-text follow-text")
                            {
                                doc3.InvokeMember("click");
                            }
                        }

                        HtmlElementCollection col4 = webBrowser1.Document.GetElementsByTagName("button");
                        foreach (HtmlElement doc4 in col4)
                        {
                            string KapatclassCek = doc.GetAttribute("class").ToString();
                            if (KapatclassCek == "modal-btn modal-close js-close")
                            {
                                doc4.InvokeMember("click");
                            }
                        }

                    }
                }
             }
Amacım burada getattribute kodu ile döngüye alıp gelen değerlerden class kısmını kontrol ettirmeye çalışıyorum eğer gelen veri if ile dediğim kısımında veri ise click ettiriyorum ama boş veri geliyor sanırsam ?