一是,前提是Datatable中已输入几行数据,sheet表名:Login,列名:edition
用getparamater("列名").valuebyrow(i)
用randomNumber.value(1,rowCount)
如:'用ValueByRow 和RandomNumber实现随机选择下拉框
Dim i,a1
i=RandomNumber.Value(1,4)
a1=Datatable.GetSheet("Login").GetParameter("edition").ValueByRow(i)
msgbox a1
Browser("网易免费邮箱 - 中国第一大电子邮件服务商").Page("网易免费邮箱 - 中国第一大电子邮件服务商").WebList("select_2").Select (a1)
如:
Get_Count=Browser("网易免费邮箱 - 中国第一大电子邮件服务商").Page("网易免费邮箱 - 中国第一大电子邮件服务商").WebList("select_2").GetROProperty("items count")
msgbox Get_Count
Randomize
Ran_Number=RandomNumber(0,Get_Count-1)
Browser("网易免费邮箱 - 中国第一大电子邮件服务商"Page("网易免费邮箱 - 中国第一大电子邮件服务商").WebList("select_2").Select"#"&Ran_Number