Sent from my BlackBerry® PlayBook™
www.blackberry.com


From: "shanker" <[email protected]>
To: "[email protected]" <[email protected]>
Sent: June 2, 2013 2:28 AM
Subject: Re: Reporter.ReportEvent with an Array

In your case, first you need to assign values like textA. How many times will you do that?  Did you try the solution I gave? It reports the name of the object.

On 31 May 2013 04:19, "Jon" <[email protected]> wrote:
I ended up using a multi-dimensional array, with the 2nd column being the text to pull, since sometimes a link wouldn't be found, i couldn't call the innertext of the link.

Dim myArray(1,1)
Set myArray(0,0) = browser(...).page(...).link(...a)
myArray(0,1) = "text A"
Set myArray(1,0) = browser(...).page(...).link(...b)
myArray(1,1) = "text B"

'then for the reporter
reporter.reportevent micpass, myArray(counter,1), " exists."
else
reporter.reportevent micfail, myArray(counter,1), " does not exist."


anshoo: You showed an example of how to use a dictionary object, which I can find just about anywhere, but not how to use it with links in an array and provide custom message on pass and fail that also said which link passed and which one failed.



On Thursday, May 23, 2013 9:45:41 AM UTC-7, shanker mothkuri wrote:
Use the following:

        If myArray(counter).Exist Then
Reporter.ReportEvent micPass, "Link ", myArray(counter).GetROProperty("name")&" - Exists"
Else
Reporter.ReportEvent micFail, "Link ", myArray(counter).GetROProperty("name")&" - does not exist"
End If


On Mon, May 20, 2013 at 11:59 PM, Jon <[email protected]> wrote:
Is there a way to customize the Reporter feature so that it basis the message on which step in an Array passed or failed?

using this:

Dim myArray(42)
Set myArray(0)=Browser("...").Page("...").Link("A")
Set myArray(1)=Browser("...").Page("...").Link("B")
Dim Counter
For Counter = 0 to 41
If myArray(counter).Exist Then
Reporter.ReportEvent micPass, "Link ", "Exists"
Else
Reporter.ReportEvent micFail, "Link ", "does not exist"
End If
Next

I'd like for the reportEvents to be actually say what passed/failed.

I've tried:

    Reporter.ReportEvent micPass, myArray(counter), "Exists"

and

   oLinkTemp = myArray(counter)
    Reporter.ReportEvent micPass, oLinkTemp, "Exists"

Neither works.


In case the problem was missed, I want the link name (set in the array) to show up in the reporter event so that in the results it'll say, 
[name of link] exists
or
[name of link] does not exist

--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
 
---
You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mercuryqtp+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Shanker.

--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
 
---
You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
 
---
You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
 
---
You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to