Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Results based on iteration
#7
Solved: 10 Years, 10 Months, 2 Weeks ago
That's still a .doc file and I still can not download them (I'm behind a firewall that doesn't allow certain file types).

Anyway, I figured out the answer (I think):
Each link is done like this:
Code:
'before link these are added, where [linkname] is the term being defined for later (can be anything)
Iteration = DataTable.GlobalSheet.GetCurrentRow 'defines what Iteration is
If Browser("...").Page("...").Link("...").Exist (1) THEN [linkname] = True Else     [linkname] = False End if       'Defines a link true/false for quick referene later

'now for the link
If [linkname]= True Then
    If Iteration = 1 OR Iteration = 2 OR Iteration = 3 OR Iteration = 4 Then
        Reporter.ReportEvent micPass, "...", "Pass"
        Browser("...").Page("...").Link("...").Click
        RunAction "...", oneIteration
    ElseIf Iteration = 5 THEN
        Reporter.ReportEvent micFail, "...", "... exist for an invalid user"
    End If
End If

If [linkname]= False Then
    If  Iteration = 1 OR Iteration = 2 OR Iteration = 3 OR Iteration = 4 Then
        Reporter.ReportEvent micFail, "IQ24C", "IQ24C does not exist"
    ElseIf Iteration = 5 THEN
            Reporter.ReportEvent micPass, "...", "... does not exist"
    End If
End If

At least that's my theory, haven't tried it yet Smile Is there a more condensed way to do this? For several links this gets to be a long piece of code, though perhaps for my purpose it wouldn't make sense to shorten as each user (iteration) can contain different links.

edit: Previous code didn't actually solve anything and was just a rehash of what I previously did.
Reply


Messages In This Thread
Results based on iteration - by joncfrazier - 05-04-2012, 02:44 AM
RE: Results based on iteration - by joncfrazier - 05-04-2012, 09:49 PM
RE: Results based on iteration - by sshukla12 - 05-07-2012, 03:22 PM
RE: Results based on iteration - by joncfrazier - 05-07-2012, 07:53 PM
RE: Results based on iteration - by sshukla12 - 05-08-2012, 10:12 AM
RE: Results based on iteration - by joncfrazier - 05-10-2012, 01:46 AM
RE: Results based on iteration - by sshukla12 - 05-10-2012, 10:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Object not found during the 2nd iteration of an Action call in a For loop BGunay 0 871 04-23-2020, 07:08 PM
Last Post: BGunay
  UFT Tool runs more than one iteration always cthossain 2 3,418 02-12-2017, 01:25 PM
Last Post: cthossain
  Function return value is not passed during the 3rd iteration premanand1979 0 2,140 10-16-2014, 09:40 PM
Last Post: premanand1979
  Iteration in Local sheets for UFT11.5 haithamQTP 1 3,037 02-27-2014, 09:12 AM
Last Post: supputuri
  Parameter iteration bistritapcv 1 3,265 03-28-2013, 10:40 AM
Last Post: Sathiya

Forum Jump:


Users browsing this thread: 2 Guest(s)