Micro Focus QTP (UFT) Forums

Full Version: Can you please help me in QTP DP to pass the variable name
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am trying to pass the variable name in the property for below:
I am using a loop here as the property name =
applicant[0].alsoAssured changes everytime when I am creating a new applicant for the same proposal so what I am doing is the following:

Code:
app = 0

.WebRadioGroup(name:=applicant["&app&"].alsoAssured")

this is with the loop of 0 to 3.

QTP does not recognise this and throws an error "Cannot identify the object "[ WebRadioGroup ]" (of class WebRadioGroup). Verify that this object's properties match an object currently displayed in your application."


Can anyone please help how to pass the variable name.

Thanks in Advance.
Sorry I was wrong it looks like QTP doesnt like passing [] in the property value
it failed for the following also:
Code:
.WebRadioGroup(name:="applicant[0].alsoAssured")

I was using a regular expression as [] here and to user the bracket directly I changed this to \[\] and it worked .. Sorry if anyone's time was wasted.
My script is working now.