Micro Focus QTP (UFT) Forums
How to use the Descriptive programming for WebRadioGroup? - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How to use the Descriptive programming for WebRadioGroup? (/Thread-How-to-use-the-Descriptive-programming-for-WebRadioGroup)



How to use the Descriptive programming for WebRadioGroup? - Uma - 09-27-2011

[/align]Hi,
I have webradiogroups in my application.I am giving the values from the Excel sheet.

I am using Descriptive programming,now my script is,
Code:
Browser("name:=My Listings","creationtime:=0").Page("name:=MLSPro","title:=My Listings").WebRadioGroup("html tag:=INPUT","visible:=True","index:=0").Select class1

Always it gives the error,
Cannot identify the specified item of the [ 126 ] object. Confirm that the specified item is included in the object's item collection.

126 is name of the webradiogroup.if I give it in the object description,again I am the same error.
Changed code:
Code:
Browser("name:=My Listings","creationtime:=0").Page("name:=MLSPro","title:=My Listings").WebRadioGroup("name:=126","html tag:=INPUT","visible:=True","index:=0").Select class1

How to use the Descriptive programming for Webradiogroup?
Any help?
Thank you
Uma


RE: How to use the Descriptive programming for WebRadioGroup? - guin.anirban - 09-27-2011

Can you try the same script with the value in double cotation like "class1".


RE: How to use the Descriptive programming for WebRadioGroup? - rajpes - 09-27-2011

Code:
Browser("creationtime:=0").Page("title:=My Listings").WebRadioGroup("name:=126").Select "class1"



RE: How to use the Descriptive programming for WebRadioGroup? - jyotikrushna - 09-27-2011

Hi Uma,

You are giving the values to webradiogroup from excel. That value is stored in the variable "class1". so no need to write class1( .select "class1") in double quote.
The problem is here that the variable "class1" containing the value isn't matching with the item presents under that webradiogroup. It might be due to the extra space presents for the value in "class1". You need to use trim for fetching the value from excel like:

Code:
class1=trim(sheet name.cells(row,col).value)
can you please try now with the above procedure?


RE: How to use the Descriptive programming for WebRadioGroup? - Uma - 09-27-2011

Thanks for all of you.
jyothi,You are correct,I had a problem with my excel sheet.

The following code I am using to take the value from Excel sheet,
In Excel sheet ,I changed my values
like this
#0,#1...instead of Single Home,Town Home)
Code:
Browser("name:=My Listings","creationtime:=0").Page("title:=My Listings").WebRadioGroup("name:=126","index:=0").Select Class1

It works fine.If I use "" ,it is putting the same value in the text box ,not taking it from Excel.
Once again thank you.
Uma