Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Capturing the text of the selected WinRadioButton in QTP10.0 on Win7
#1
Solved: 11 Years, 4 Months ago
Hi All,

I am facing a problem in Capturing the text of the selected WinRadioButton in QTP10.0 on Win7...

The error is as follows:
Object doesn't support this property or method: 'Window(...).WinRadioButton.GetROProperty'

Line (45):
Code:
"objWorkbook.Sheets("Sheet1").Cells(i,11).Value = Window("Flight Reservation").WinRadioButton.GetROProperty("text")".


Attached Files Image(s)
   
Reply
#2
Solved: 11 Years, 4 Months ago
Try This:
Code:
objWorkbook.Sheets("Sheet1").Cells(i,11).Value =Window("Flight Reservation").WinRadioButton("Business").GetROProperty("checked")
Reply
#3
Solved: 11 Years, 4 Months ago
Hi BVVPrasad,

Thanks for the reply... The code that you mentioed halped me save the ("Business") in the excel sheet...

But i need to capture the text of the selected WinRadioButton object in the sample application...
Reply
#4
Solved: 11 Years, 4 Months ago
Hi Joe,

This should work:
Code:
arrRadio=Array("Business","Economy","First")

for Count=0 to Ubound(arrRadio)
bState=Window("Flight Reservation").WinRadioButton(arrRadio(Count)).GetROProperty("checked")
If Instr(bState,"ON")>0 Then
strButtonName=Window("Flight Reservation").WinRadioButton(arrRadio(Count)).GetROProperty("text")
objWorkbook.Sheets("Sheet1").Cells(i,11).Value=strButtonName
Exit For
End If
Next

Thanks,
Prasad
Reply
#5
Solved: 11 Years, 4 Months ago
Thanks alot Prasad... It worked and is correctly capturing the text of the selected WinRadioButton... Smile
Reply
#6
Solved: 11 Years, 4 Months ago
Good reply..
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  DataGrid: double click on selected row robertosalemi 0 4,437 05-12-2016, 03:00 PM
Last Post: robertosalemi
  Need to Validate Text filed is blank after clicking on the Text box balak89 3 4,907 09-13-2015, 12:06 AM
Last Post: ADITI1992
  Capturing a value in a webtable EK21 4 4,389 08-21-2015, 01:08 AM
Last Post: EK21
  Need help in capturing the Calculator result using QTP 11 vishruth143 0 2,110 01-20-2015, 11:08 AM
Last Post: vishruth143
  QTP 11 and IE9 64bit on Win7&SP1 64bit, QTP does not recognize objects in website jpalos 4 8,723 08-27-2014, 10:11 AM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 2 Guest(s)