10-10-2009, 02:23 AM
Thank you both for your generous help. With some fiddling around, I was able to find a solution.
I tried your solution first, Ankur. However, the readystate for the drop down lists was always set to "complete". I do not quite know why, since I did not write the code for the web app page.
I went on to try jsknight1969's solution, and after a while, I was able to make it work.
Here is the code, modified from the example I gave above:
"Items count" < 2, while a crude method, works quite well for properly measuring the timing. Again, thank you for the help.
Incite1321
I tried your solution first, Ankur. However, the readystate for the drop down lists was always set to "complete". I do not quite know why, since I did not write the code for the web app page.
I went on to try jsknight1969's solution, and after a while, I was able to make it work.
Here is the code, modified from the example I gave above:
Code:
Dim dpBrowser
dpBrowser = "micclass:=Browser"
Dim dpPage
dpPage = "micclass:=Page"
country = Trim(DataTable("country", dtLocalSheet))
state_province = Trim(DataTable("state_province", dtLocalSheet))
city = Trim(DataTable("city", dtLocalSheet))
<for loop here>
If country <> "" AND state_province <> "" AND city <> "" Then
Do While Browser(dpBrowser).Page(dpPage).WebList("html id:=.*ddlCountry.*").GetROProperty("Items count") < 2
Wait(1)
Loop
Browser(dpBrowser).Page(dpPage).WebList("html id:=.*ddlCountry.*").Select country
Do While Browser(dpBrowser).Page(dpPage).WebList("html id:=.*ddlState_Province.*").GetROProperty("Items count") < 2
Wait (1)
Loop
Browser(dpBrowser).Page(dpPage).WebList("html id:=.*ddlState_Province.*").Select state_province
Do While Browser(dpBrowser).Page(dpPage).WebList("html id:=.*ddlcity.*").GetROProperty("Items count") < 2
Wait (1)
Loop
Browser(dpBrowser).Page(dpPage).WebList("html id:=.*ddlcity.*").Select city
End If
<some other code>
<save entry>
<end for loop>
"Items count" < 2, while a crude method, works quite well for properly measuring the timing. Again, thank you for the help.
Incite1321