Ajinkya_1988
New Member
- Joined
- Mar 29, 2019
- Messages
- 3
I can login on my website then then navigate to a web page where I need to select a value from a drop down box then need to click on add button. (using <code style="margin: 0px; padding: 1px 5px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; background-color: rgb(239, 240, 241); white-space: pre-wrap; color: rgb(36, 39, 41);">vba</code>). select given value from dropdown list and click to add button. I am not able to do that i have tried but unable to do that.
my drop down list html code :
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;"><select id="input_ifxlist_opts"><option value="43.66.18.70>11">SAL-EC-S1>sp_wan</option>
<option value="43.72.38.250>11">SDT-EC-S1>sp_wan</option>
<option value="43.95.88.9>3">SISC-CE2>Gi0/2</option>
<option value="43.95.88.5>3">SISC-CE1>Gi0/2</option>
<option value="43.88.32.237>11">SID-EC-S1>sp_wan</option>
<option value="43.95.74.54>2">SOEM_PG-CE1V.virtela.net>Gi0/0/1</option>
<option value="43.95.66.1>2">SAL-CE1>Gi0/1</option>
<option value="43.76.42.10>2">SEK-CE1V>Gi0/0</option>
<option value="43.95.94.5>2">SEV-CE2>Gi0/1</option>
<option value="43.95.78.9>2">SI-CE2>Gi0/1</option>
<option value="43.95.88.13>3">SID-CE1>Gi0/1</option>
<option value="43.95.76.5>1">SOK-CE1>Gi0/0</option>
<option value="43.95.86.9>37">SOMEA-CE1>Gi0/1.102</option>
<option value="43.95.92.9>2">SPH-CE1>Gi0/0/1</option>
<option value="43.95.70.2>2">STWN-CE1V>Gi0/1</option>
<option value="43.95.74.2>3">SOEM_KL-CE3>Gi0/1</option>
<option value="43.95.74.62>2">SOEM_KL-CE1V.virtela.net>Gi0/0/1</option>
<option value="43.95.74.46>2">SOMAS-CE1V>Gi0/0/1</option>
<option value="43.95.72.33>2">SDT-CE1.virtela.net>Gi0/0/1</option>
<option value="43.95.72.45>2">SOTHAI-CE>Gi0/0/1</option>
<option value="43.95.72.41>2">STT-CE1V.virtela.net>Gi0/0/1</option>
<option value="43.95.72.37>2">STTB-CE1.virtela.net>Gi0/0/1</option>
<option value="43.74.61.6>11">SOEM-PG-EC-S1>sp_wan</option>
<option value="43.95.92.2>2">SPHWNS-CE>Gi0/0/1</option>
<option value="43.95.65.1>4">GDC-CE1>Gi0/2</option>
<option value="43.72.61.5>11">SOTHAI-EC-S1>sp_wan</option>
<option value="146.215.74.110>3">IBP-CE1>Gi0/1</option>
<option value="43.95.86.9>2">SOMEA-CE1>Gi0/1</option>
<option value="43.95.88.5>2">SISC-CE1>Gi0/1</option>
<option value="43.95.88.9>2">SISC-CE2>Gi0/1</option>
my add button html code is :
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;"><button type="button" *******="addToList(document.forms['queryform'].input_ifxlist,document.getElementById('input_ifxlist_opts'))">Add</button>
Sub login_page()
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;">Dim ieApp As SHDocVw.InternetExplorer
Dim iedoc As MSHTML.HTMLDocument
'Dim ieApp As InternetExplorer
'Dim ieDoc As Object
'Dim ieTable As Object
'Dim clip As DataObject
Set ieApp = New SHDocVw.InternetExplorer
ieApp.Visible = True
ieApp.navigate "http:"
Do While ieApp.Busy: DoEvents: Loop
Do Until ieApp.readyState = READYSTATE_COMPLETE: DoEvents: Loop
Set iedoc = ieApp.document
'fill in the login form – View Source from your browser to get the control names
With iedoc.forms(0)
.user.Value = "id"
.Password.Value = "Pass"
.submit
End With
ieApp.navigate "http:"
Do While ieApp.Busy: DoEvents: Loop
ieApp.navigate "http:"
Do While ieApp.Busy: DoEvents: Loop
ieApp.navigate "http:"
Do While ieApp.Busy: DoEvents: Loop
ieApp.navigate "http:"
Do While ieApp.Busy: DoEvents: Loop
ieApp.navigate "http:"
Do While ieApp.Busy: DoEvents: Loop
ieApp.navigate "http:"
Do While ieApp.Busy: DoEvents: Loop
ieApp.navigate "http:"
Do While ieApp.Busy: DoEvents: Loop
ieApp.navigate "http:"
Do While ieApp.Busy: DoEvents: Loop
End Sub</code></code></pre></code></pre>
my drop down list html code :
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;"><select id="input_ifxlist_opts"><option value="43.66.18.70>11">SAL-EC-S1>sp_wan</option>
<option value="43.72.38.250>11">SDT-EC-S1>sp_wan</option>
<option value="43.95.88.9>3">SISC-CE2>Gi0/2</option>
<option value="43.95.88.5>3">SISC-CE1>Gi0/2</option>
<option value="43.88.32.237>11">SID-EC-S1>sp_wan</option>
<option value="43.95.74.54>2">SOEM_PG-CE1V.virtela.net>Gi0/0/1</option>
<option value="43.95.66.1>2">SAL-CE1>Gi0/1</option>
<option value="43.76.42.10>2">SEK-CE1V>Gi0/0</option>
<option value="43.95.94.5>2">SEV-CE2>Gi0/1</option>
<option value="43.95.78.9>2">SI-CE2>Gi0/1</option>
<option value="43.95.88.13>3">SID-CE1>Gi0/1</option>
<option value="43.95.76.5>1">SOK-CE1>Gi0/0</option>
<option value="43.95.86.9>37">SOMEA-CE1>Gi0/1.102</option>
<option value="43.95.92.9>2">SPH-CE1>Gi0/0/1</option>
<option value="43.95.70.2>2">STWN-CE1V>Gi0/1</option>
<option value="43.95.74.2>3">SOEM_KL-CE3>Gi0/1</option>
<option value="43.95.74.62>2">SOEM_KL-CE1V.virtela.net>Gi0/0/1</option>
<option value="43.95.74.46>2">SOMAS-CE1V>Gi0/0/1</option>
<option value="43.95.72.33>2">SDT-CE1.virtela.net>Gi0/0/1</option>
<option value="43.95.72.45>2">SOTHAI-CE>Gi0/0/1</option>
<option value="43.95.72.41>2">STT-CE1V.virtela.net>Gi0/0/1</option>
<option value="43.95.72.37>2">STTB-CE1.virtela.net>Gi0/0/1</option>
<option value="43.74.61.6>11">SOEM-PG-EC-S1>sp_wan</option>
<option value="43.95.92.2>2">SPHWNS-CE>Gi0/0/1</option>
<option value="43.95.65.1>4">GDC-CE1>Gi0/2</option>
<option value="43.72.61.5>11">SOTHAI-EC-S1>sp_wan</option>
<option value="146.215.74.110>3">IBP-CE1>Gi0/1</option>
<option value="43.95.86.9>2">SOMEA-CE1>Gi0/1</option>
<option value="43.95.88.5>2">SISC-CE1>Gi0/1</option>
<option value="43.95.88.9>2">SISC-CE2>Gi0/1</option>
my add button html code is :
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;"><button type="button" *******="addToList(document.forms['queryform'].input_ifxlist,document.getElementById('input_ifxlist_opts'))">Add</button>
Sub login_page()
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;">Dim ieApp As SHDocVw.InternetExplorer
Dim iedoc As MSHTML.HTMLDocument
'Dim ieApp As InternetExplorer
'Dim ieDoc As Object
'Dim ieTable As Object
'Dim clip As DataObject
Set ieApp = New SHDocVw.InternetExplorer
ieApp.Visible = True
ieApp.navigate "http:"
Do While ieApp.Busy: DoEvents: Loop
Do Until ieApp.readyState = READYSTATE_COMPLETE: DoEvents: Loop
Set iedoc = ieApp.document
'fill in the login form – View Source from your browser to get the control names
With iedoc.forms(0)
.user.Value = "id"
.Password.Value = "Pass"
.submit
End With
ieApp.navigate "http:"
Do While ieApp.Busy: DoEvents: Loop
ieApp.navigate "http:"
Do While ieApp.Busy: DoEvents: Loop
ieApp.navigate "http:"
Do While ieApp.Busy: DoEvents: Loop
ieApp.navigate "http:"
Do While ieApp.Busy: DoEvents: Loop
ieApp.navigate "http:"
Do While ieApp.Busy: DoEvents: Loop
ieApp.navigate "http:"
Do While ieApp.Busy: DoEvents: Loop
ieApp.navigate "http:"
Do While ieApp.Busy: DoEvents: Loop
ieApp.navigate "http:"
Do While ieApp.Busy: DoEvents: Loop
End Sub</code></code></pre></code></pre>