Hi all,
Is there any idea to click the select component of an HTML page programitically
Here is the HTMT code
When one of bank is selected, the branches of that bank will be lsited.HTML Code:<td width="83%" align=left nowrap><font face="Times New Roman, Times, serif"> <select name=cboPrimary size=1 onChange="RemoveOptionAndSubmit(cboSecondary)" style="width=350px;"> <option value="003" >ALLIED BANKING CORPORATION - $ BTB (USD )</option> <option value="004" >ALLIED BANKING CORPORATION - PESO BTB (PHP )</option> <option value="008" >ALLIED BANKING CORPORATION - PESO DTOD (PHP )</option> <option value="052" >BANK OF THE PHILIPPINE ISLAND (USD )</option> <option value="049" >BANK OF THE PHILLIPINE ISLAND (PHP )</option> <option value="179" >EQUITABLE BANK / PCI (PHP )</option> <option value="175" >METRO BANK (PHP )</option> <option value="176" >METRO BANK - $ (USD )</option> <option value="177" >PHILIPPINE NATIONAL BANK (PHP )</option> <option value="178" >PHILIPPINE NATIONAL BANK - $ (USD )</option> </select> </font> </td>
Now I want to do this process programtically.
Here I used this code:
VB Code:
Dim BankIndex as Integer Dim BankName as String BankIndex = 5 browser.Document.getElementById("cboPrimary").selectedIndex = BankIndex
This code select the expected bank BANK OF THE PHILIPPINE ISLAND (USD )
But the page not lists the branch of this bank. It still remain wihout any action.
I also tried with the following code
VB Code:
browser.Document.getElementById("cboPrimary").click
But no effect
Is there any suggession to solve this problem
With regards,
Nasreen




Reply With Quote