按键精灵HtmlCheck 选择/清除网页中的单选框或复选框

命令名称:
HtmlCheck 选择/清除网页中的单选框或复选框
命令功能:
选择/清除网页中的单选框或复选框。
命令参数:
参数1:布尔值,true代表选中,false代表清除
参数2:字符串型,网页元素特征字符串
返 回 值:
脚本例子:
(8.x语法)  
复制代码
  1. Call Plugin.Web.Bind("WQM.exe")   
  2. Call Plugin.Web.Go("http://www.vrbrothers.com/cn/wqm/demo/pages/Demo-ComplexForm.aspx")   
  3. //Delay 3000   
  4. Call Plugin.Web.HtmlInput("按键精灵","id:ctl00_mainContent_tbUsername")   
  5. Call Plugin.Web.HtmlInput("password","id:ctl00_mainContent_tbPassword")   
  6. Call Plugin.Web.HtmlInput("[email protected]","id:ctl00_mainContent_tbEMail")   
  7. Call Plugin.Web.HtmlCheck(true,"id:ctl00_mainContent_rblGender_0")   
  8. Call Plugin.Web.HtmlSelect("湖北","id:ctl00_mainContent_ddlProvince")   
  9. //Delay 500   
  10. Call Plugin.Web.HtmlSelect("宜昌","id:ctl00_mainContent_ddlCity")   
  11. //Delay 500   
  12. Call Plugin.Web.HtmlSelect("4010200%4083000","id:ctl00_mainContent_lbObjectives")   
  13. Call Plugin.Web.HtmlCheck(true, "id:ctl00_mainContent_cblHobies_0")   
  14. Call Plugin.Web.HtmlCheck(true, "id:ctl00_mainContent_cblHobies_1")   
  15. //Delay 2000   
  16. Call Plugin.Web.HtmlCheck(true, "id:ctl00_mainContent_cblHobies_2")   
  17. Call Plugin.Web.HtmlInput("Test!","id:ctl00_mainContent_tbSelfAssement")   
  18. Call Plugin.Web.HtmlCheck(true,"id:ctl00_mainContent_cbAcceptTerms")   
  19. Delay 1000   
  20. Call Plugin.Web.HtmlClick("tag:input&value:提交")   
  21. Sub OnScriptExit()   
  22.     Plugin Web.Tips("脚本运行完毕")   
  23. End Sub  
  24.        
Call Plugin.Web.Bind("WQM.exe")
Call Plugin.Web.Go("http://www.vrbrothers.com/cn/wqm/demo/pages/Demo-ComplexForm.aspx")
//Delay 3000
Call Plugin.Web.HtmlInput("按键精灵","id:ctl00_mainContent_tbUsername")
Call Plugin.Web.HtmlInput("password","id:ctl00_mainContent_tbPassword")
Call Plugin.Web.HtmlInput("[email protected]","id:ctl00_mainContent_tbEMail")
Call Plugin.Web.HtmlCheck(true,"id:ctl00_mainContent_rblGender_0")
Call Plugin.Web.HtmlSelect("湖北","id:ctl00_mainContent_ddlProvince")
//Delay 500
Call Plugin.Web.HtmlSelect("宜昌","id:ctl00_mainContent_ddlCity")
//Delay 500
Call Plugin.Web.HtmlSelect("4010200%4083000","id:ctl00_mainContent_lbObjectives")
Call Plugin.Web.HtmlCheck(true, "id:ctl00_mainContent_cblHobies_0")
Call Plugin.Web.HtmlCheck(true, "id:ctl00_mainContent_cblHobies_1")
//Delay 2000
Call Plugin.Web.HtmlCheck(true, "id:ctl00_mainContent_cblHobies_2")
Call Plugin.Web.HtmlInput("Test!","id:ctl00_mainContent_tbSelfAssement")
Call Plugin.Web.HtmlCheck(true,"id:ctl00_mainContent_cbAcceptTerms")
Delay 1000
Call Plugin.Web.HtmlClick("tag:input&value:提交")
Sub OnScriptExit()
    Plugin Web.Tips("脚本运行完毕")
End Sub
     
脚本例子:
(7.x语法)  
复制代码
  1. Plugin Web.Bind("WQM.exe")   
  2. Plugin Web.Go("http://www.vrbrothers.com/cn/wqm/demo/pages/Demo-ComplexForm.aspx")   
  3. //Delay 3000   
  4. Plugin Web.HtmlInput("按键精灵","id:ctl00_mainContent_tbUsername")   
  5. Plugin Web.HtmlInput("password","id:ctl00_mainContent_tbPassword")   
  6. Plugin Web.HtmlInput("[email protected]","id:ctl00_mainContent_tbEMail")   
  7. Plugin Web.HtmlCheck(true,"id:ctl00_mainContent_rblGender_0")   
  8. Plugin Web.HtmlSelect("湖北","id:ctl00_mainContent_ddlProvince")   
  9. //Delay 500   
  10. Plugin Web.HtmlSelect("宜昌","id:ctl00_mainContent_ddlCity")   
  11. //Delay 500   
  12. Plugin Web.HtmlSelect("4010200%4083000","id:ctl00_mainContent_lbObjectives")   
  13. Plugin Web.HtmlCheck(true, "id:ctl00_mainContent_cblHobies_0")   
  14. Plugin Web.HtmlCheck(true, "id:ctl00_mainContent_cblHobies_1")   
  15. //Delay 2000   
  16. Plugin Web.HtmlCheck(true, "id:ctl00_mainContent_cblHobies_2")   
  17. Plugin Web.HtmlInput("Test!","id:ctl00_mainContent_tbSelfAssement")   
  18. Plugin Web.HtmlCheck(true,"id:ctl00_mainContent_cbAcceptTerms")   
  19. Delay 1000   
  20. Plugin Web.HtmlClick("tag:input&value:提交")   
  21. Sub OnScriptExit   
  22.     Plugin Web.Tips("脚本运行完毕")   
  23. Return  
  24.        
Plugin Web.Bind("WQM.exe")
Plugin Web.Go("http://www.vrbrothers.com/cn/wqm/demo/pages/Demo-ComplexForm.aspx")
//Delay 3000
Plugin Web.HtmlInput("按键精灵","id:ctl00_mainContent_tbUsername")
Plugin Web.HtmlInput("password","id:ctl00_mainContent_tbPassword")
Plugin Web.HtmlInput("[email protected]","id:ctl00_mainContent_tbEMail")
Plugin Web.HtmlCheck(true,"id:ctl00_mainContent_rblGender_0")
Plugin Web.HtmlSelect("湖北","id:ctl00_mainContent_ddlProvince")
//Delay 500
Plugin Web.HtmlSelect("宜昌","id:ctl00_mainContent_ddlCity")
//Delay 500
Plugin Web.HtmlSelect("4010200%4083000","id:ctl00_mainContent_lbObjectives")
Plugin Web.HtmlCheck(true, "id:ctl00_mainContent_cblHobies_0")
Plugin Web.HtmlCheck(true, "id:ctl00_mainContent_cblHobies_1")
//Delay 2000
Plugin Web.HtmlCheck(true, "id:ctl00_mainContent_cblHobies_2")
Plugin Web.HtmlInput("Test!","id:ctl00_mainContent_tbSelfAssement")
Plugin Web.HtmlCheck(true,"id:ctl00_mainContent_cbAcceptTerms")
Delay 1000
Plugin Web.HtmlClick("tag:input&value:提交")
Sub OnScriptExit
    Plugin Web.Tips("脚本运行完毕")
Return
     

你可能感兴趣的:(按键精灵HtmlCheck 选择/清除网页中的单选框或复选框)