Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can you please help me in QTP DP to pass the variable name
#1
Solved: 10 Years, 2 Months, 3 Weeks ago
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.
Reply
#2
Solved: 10 Years, 2 Months, 3 Weeks ago
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pass reference to datatable into function smallsteve 2 2,095 09-28-2017, 09:18 PM
Last Post: smallsteve
  How to copy the content of a variable to clipboard - QTP 10 rohit330 2 17,778 02-22-2012, 08:29 PM
Last Post: rohit330
  Pass "/" in Query string to DB Anjali09 0 2,586 01-04-2012, 08:34 PM
Last Post: Anjali09
  how to pass an integer array variable in a query sujaravi123 1 3,426 10-28-2011, 01:44 PM
Last Post: ravi.gajul
  How to pass index value run time. SarodeGirish 6 7,975 08-24-2011, 12:57 AM
Last Post: souvikghosh_diatm

Forum Jump:


Users browsing this thread: 1 Guest(s)