Author Topic: Any way to Parametrize checkboxes present in one webpage?  (Read 588 times)

Offline Sumit Kalra

  • Newbie
  • *
  • Posts: 14
  • We\'re detectives. We\'re investigators. We\'re evaluators. We\'re communicators. We\'re writers. We\'re critics. We\'re advocates. We\'re leaders. We\'re supporters. We\'re learners. We\'re teachers. We\'re forecasters. We\'re testers.
    • http://
Any way to Parametrize checkboxes present in one webpage?
« on: May 25, 2010, 05:41:42 AM »
Suppose there are 20 checkboxes in a webpage.

Is there any way through which we can parametrize the checkboxes like other fields? I want that - before executing the script, In data table we can mention which checkbox should be checked.

Offline vipul N mehta

  • Newbie
  • *
  • Posts: 8
  • Keen about QTP
Re: Any way to Parametrize checkboxes present in one webpage?
« Reply #1 on: May 25, 2010, 11:08:52 AM »
The property which makes the chk box unique in that page, pass that property as a parameter.
use DP for this
browser("").CheckBox("name:="&var)

Hope this answers your query

Offline Tarun Lalwani

  • Administrator
  • Hero Member
  • *****
  • Posts: 2999
    • KnowledgeInbox
Re: Any way to Parametrize checkboxes present in one webpage?
« Reply #2 on: May 25, 2010, 02:08:22 PM »
Depends on how those checkboxes are implemented. You can have the name of the checkbox in the data table and have the same logical name in the OR and set that one off

...WebCheckBox(DataTable("WhichOne").Set "ON"
Regards,
Tarun
KnowledgeInbox Administrator

KnowledgeInbox" style="border:0

Offline Sumit Kalra

  • Newbie
  • *
  • Posts: 14
  • We\'re detectives. We\'re investigators. We\'re evaluators. We\'re communicators. We\'re writers. We\'re critics. We\'re advocates. We\'re leaders. We\'re supporters. We\'re learners. We\'re teachers. We\'re forecasters. We\'re testers.
    • http://
Re: Any way to Parametrize checkboxes present in one webpage?
« Reply #3 on: May 31, 2010, 03:06:27 AM »
Thanks Tarun