Click here to Skip to main content
15,867,756 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Please help me problem button click
<input type="submit" class="button" name="regsubmit" value="Üyelik Kayıt Formunu Gönder!">

GeckoElementCollection tagsCollection = geckoWebBrowser1.Document.GetElementsByTagName("input");
           foreach (GeckoElement currentTag in tagsCollection)
           {
               if (currentTag.GetAttribute("class").Equals("button"))
               {
                   ((GeckoElement)currentTag).Equals("click");
               }
               //delay some seconds to click next button...
           }


C#
foreach (HtmlElement btn in webBrowser1.Document.GetElementsByTagName("button"))
           {
               if (btn.GetAttribute("ClassName") == "btn primary-btn js-submit")
               {

                   btn.InvokeMember("click");
               }
           }
Posted
Updated 26-Mar-15 8:31am
v5
Comments
ZurdoDev 26-Mar-15 14:20pm    
What's the problem?
Erhan Güneş 26-Mar-15 14:29pm    
gecko browser button click :s
<input type="submit" class="button" name="regsubmit" value="Üyelik Kayıt Formunu Gönder!">
ZurdoDev 26-Mar-15 14:35pm    
But you haven't said what the problem is.
Erhan Güneş 26-Mar-15 14:37pm    
<input type="submit" class="button" name="regsubmit" value="Üyelik Kayıt Formunu Gönder!">

Geckobrowser not click problem
ZurdoDev 26-Mar-15 14:39pm    
I realize English may not be your native language but it is very hard to understand what you are saying.

Are you saying the button does not actually submit the form using the Gecko browser?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900