Страницы: 1
RSS
VBA Залогиниться на сайте, Не получается нажат на кнопку вход
 
Добрый день

Помогите разобраться, как можно после ввода данных нажать на кнопку входа?
Код
Sub Open_multiple_sub_pages_from_main_page()
Dim i As Long
Dim IE As Object
Dim objCollection As Object

' Create InternetExplorer Object
Set IE = CreateObject("InternetExplorer.Application")
' You can uncoment Next line To see form results
IE.Visible = True

' Send the form data To URL As POST binary request
IE.navigate "[URL=http://www.spark-interfax.ru]http://www.spark-interfax.ru[/URL]"

' Wait while IE loading...
While IE.Busy
        DoEvents
Wend

Set objCollection = IE.document.getElementsByTagName("input")

i = 0
While i < objCollection.Length
    If objCollection(i).Name = "username" Then
        ' Set text for search
        objCollection(i).Value = "san"
    End If
    If objCollection(i).Name = "password" Then
        ' Set text for search
        objCollection(i).Value = "San"
    End If
Страницы: 1
Наверх