Понедельник, 16 Сентября 2019 г. 07:25
+ в цитатник
Добрый день.
Пытаюсь обработать форму авторизации на Яндекс Почте:
Sub testIE() ' поля в форме
Dim texto As String, str_URL As String
Dim strЛогин As String, strПароль As String
Dim ie As Object
Dim html As Object
Set ie = CreateObject("InternetExplorer.Application")
strЛогин = "***"
strПароль = "***"
str_URL = "https://passport.yandex.ru/auth?from=mail&origin=hostroot_homer_auth_ru&retpath=https%3A%2F%2Fmail.yandex.ru%2F%3Fuid%3D50723641%2523message%2F1702923609......."
With ie
.Navigate str_URL
Do Until Not ie.Busy And ie.ReadyState = 4
DoEvents
Loop
.Visible = True
End With
Set html = ie.Document
html.getElementById("passp-field-login").Value = strЛогин 'поле "введите логин"
html.getElementById("hiddenPassword").Value = strПароль 'поле "введите пароль"
html.getElementById("control button2 button2_view_classic button2_size_l button2_theme_action button2_width_max button2_type_submit passp-form-button").Click
И здесь обнаружил, что у кнопки "Войти" нет Id.
Есть какой-нибудь еще способ обращения к контролу формы, кроме getElementById, который "проглатывает" VBA?
https://www.sql.ru/forum/1317042/getelementbyid
-
Запись понравилась
-
0
Процитировали
-
0
Сохранили
-