vb not able to click drop down and select value on website - web scraping

swetaj29

New Member
Joined
Oct 8, 2015
Messages
1
I am trying to pull some data from a website. I want to click a drop down button on the website "Select Payment Frequency" and select "YEARLY" from it. However, I am unable to select it. I have tried all combinations but am not able to do it. Please find below the code I am using.

Sub PC()
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
ie.Top = 0
ie.Left = 0
ie.Width = 800
ie.Height = 600
ie.Visible = True
ie.Navigate (http://www.iciciprulife.com/public/C...ne.htm?UID=497)
Application.Wait (Now + TimeValue("0:00:01"))
Do While ie.Busy
DoEvents
Loop
ie.document.getElementById("datepicker2").Value = “12/10/1997”
ie.document.getElementById("imobile").Value = "9987587821"
ie.document.getElementById("iEmail").Value = "jainsweta29@gmail.com"
ie.document.getElementById("closebalfund").Click
Application.Wait (Now + TimeValue("0:00:01"))
While ie.Busy
DoEvents
Wend
ie.document.getElementById("premium").Value = Premium
ie.document.getElementById("paymentFrequency").Value = "YEARLY"
While ie.Busy
DoEvents
Wend
End Sub​
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,223,099
Messages
6,170,114
Members
452,302
Latest member
TaMere

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top