منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : كيف يمكنني الضغط علي زر دااخل صفحة موجود داخل Class
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
السلام عليكم ورحمه الله وبركاته
اريد الضغط علي زر داخل صفحة داخل الويب برزور داخل كلاس اليكم كود الزر
PHP كود :
<button class="bui-button bui-button--large bui-button--wide" type="submit"><span class="bui-button__text">Next</span></button
وهذا الكود الذي استخدمه

PHP كود :
'get collection of all div in the webpage"
        For Each divSect As HtmlElement In WebBrowser1.Document.GetElementsByTagName("div")

            '
get the div which has the tag of Two Cell"
            If divSect.OuterHtml.Contains("
bui-button bui-button--large bui-button--wide") Then

                'get the button inside the div which has the tag of Two Cell"
 
               For Each elem As HtmlElement In divSect.Children
                    If elem
.GetAttribute("bui-button bui-button--large bui-button--wide") = "button" Then
                        elem
.InvokeMember("click")
 
                   End If
 
               Next
            End 
If 
ضع رابط الموقع لفحصه وإيجاد حل مناسب لجميع ما تريد منه من بيانات

أو راجع هذا الموضوع http://vb4arb.com/vb/showthread.php?tid=27230
Dim eCollection As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("button")
 For Each item As HtmlElement In eCollection
     Dim classname = item.GetAttribute("className")
     If classname = "bui-button bui-button--large bui-button--wide" Then
         item.InvokeMember("click")
     End If
 Next
شكرا اخي الفاضل