|
id=dspStoreSelectListDto0 form name="storeSelectActionForm" id="submitForm_0"
id=dspStoreSelectListDto1 form name="storeSelectActionForm" id="submitForm_1"
id=dspStoreSelectListDto2 form name="storeSelectActionForm" id="submitForm_2"
id=dspStoreSelectListDto3 form name="storeSelectActionForm" id="submitForm_3"
id=dspStoreSelectListDto4 form name="storeSelectActionForm" id="submitForm_4"
submitForm_0을 누르려면 어떻게 해야 하나요.
로그인이 필요한사이트라 일단 vba로 로그인까지는 됐는데
선택이 안되네요 공부부족이라 알려주시면 감사하겠습니다.
----------------
<tr id="dspStoreSelectListDto0"class="item">
<td>
<form name="storeSelectActionForm" id="submitForm_0" method="POST" action="/CLN/storeSelect/" autocomplete="off">
<input type="hidden" name="storeId" value="H00000001">
<a href="javascript:$('#submitForm_0').attr('action' , '/CLN/topMenu/').submit()">name1234</a>
</form>
</td>
<td>
○
</td>
<td>
2020/1/24
<br />
SSP
</td>
<td>
2020/1/24
<br />
ABC
</td>
</tr>
<tr id="dspStoreSelectListDto1" class="item">
<td>
<form name="storeSelectActionForm" id="submitForm_1" method="POST" action="/CLN/storeSelect/" autocomplete="off">
----------------
Private Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub get3(cnt As Integer)
'On Error GoTo ErrHandler '
Dim objIE As InternetExplorer '
Set objIE = New InternetExplorer
Dim userID As String ' ID
Dim password As String ' PW
Dim month As String '
userID = "***"
password = "***"
'month = Cells(month_col, month_row).Value
Dim tmp As Variant
Dim tmp2 As Variant
If userID = "" Then
Exit Sub
End If
objIE.Visible = True
objIE.navigate "https://******" '
Call WaitIE3(objIE)
Dim htmlDoc As HTMLDocument
Set htmlDoc = objIE.document
' 1.
With htmlDoc
.getElementById("userId").Value = userID '
.getElementById("password").Value = password '
End With
Dim inputTags As IHTMLElementCollection
Set inputTags = htmlDoc.getElementsByTagName("input")
Dim inputTag As IHTMLElement
For Each inputTag In inputTags
If inputTag.alt = "login" Then
inputTag.Click '
Exit For
End If
Next
' 2.slect
Dim nnn As Long
For nnn = 0 To 3
For Each inputTag2 In objIE.document.getElementsByTagName("storeSelectActionForm"&nnn)
If inputTag2.alt = "submitForm_"&nnn Then
inputTag2.Click '
Exit For
' End If
Next
Next
End Sub
Sub WaitIE3(objIE As InternetExplorer)
Do While objIE.Busy = True Or objIE.readyState < 4 '
'4=READYSTATE_COMPLETE
DoEvents
Loop
End Sub
|
|