Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WebCheckBox - Index problem
#1
Not Solved
Hello All ! How are you? I hope you are very good.

I have a problem with the "index" identifier in the WebCheckBox element, I'm trying to make something like this:
Code:
Count=Browser("Application RECLID").Page("Application RECLID").WebTable("Code PSV").RowCount

For y=1 to Count

CheckText = Browser("Application RECLID").Page("Application RECLID").WebCheckBox("WebCheckBox").GetTOProperty("Value")
// Here, the changing index code to WebCheckBox with de Count variable.//

Datatable.LocalSheet.AddParameter "Code",CellText

Next
I read about "index" in the help page, but still unclear for my.

Thanks!
Reply
#2
Not Solved
Hi,

I am not sure about what you want to test.

But if you want to use the index, then you have to set the index value to checkbox in the OR.

Use "SetTOProperty" to change the value in the OR.

Code:
Count=Browser("Application RECLID").Page("Application RECLID").WebTable("Code PSV").RowCount

For y=0 to Count-1
Browser("Application RECLID").Page("Application RECLID").WebCheckBox("WebCheckBox").SetToProperty "index",y
CheckText = Browser("Application RECLID").Page("Application RECLID").WebCheckBox("WebCheckBox").GetTOProperty("Value")

Datatable.LocalSheet.AddParameter "Code",CellText

Next
Please let me know if you need any more informaiton.
Sorry for the code that I shared in the previous reply,please ignore that.

Code:
Count=Browser("Application RECLID").Page("Application RECLID").WebTable("Code PSV").RowCount
DataTable.LocalSheet.AddParameter "Code",""
For y=0 to Count-1
         DataTable.LocalSheet.SetCurrentRow y+1
         Browser("Application RECLID").Page("Application RECLID").WebCheckBox("WebCheckBox").SetToProperty "index",y
         CheckText = Browser("Application RECLID").Page("Application RECLID").WebCheckBox("WebCheckBox").GetTOProperty("Value")
         DataTable("Code", dtlocalSheet)= CheckText
Next

Please let me know if you need any more info.
Thanks,
SUpputuri
Reply
#3
Not Solved
Hello supputuri !

Thanks for help me, look, I'm trying to do a list of values about the code in the checkbox, becouse, I need a large code to set "on"the checkbox and it's complicated to write one by one.

The code doesn't works, only 1 code is replicated 21 times in the table.

I don't know how can I get the 21 codes from the checkboxs
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  click each web link in a page using Index or other method in QTP smeijer 13 24,724 04-29-2017, 04:53 PM
Last Post: kowshik
  Upgraded QTP 11.0 to UFT 11.53, Object Index Properties are varying Raghava M 0 2,184 01-28-2015, 06:02 PM
Last Post: Raghava M
  General run error. Line (18): "Loop while Browser("Index:=0").Object.Busy" AshokReddy 3 5,076 12-20-2013, 01:44 PM
Last Post: sshukla12
  Unable to select a combo item by value or index martinshort 2 3,575 08-26-2013, 07:55 PM
Last Post: sudhirzpatil
  How to get a index value of the webelement in runtime silpavinod 4 13,462 12-18-2012, 11:14 PM
Last Post: sonynaveena

Forum Jump:


Users browsing this thread: 1 Guest(s)