Results based on iteration - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Results based on iteration (/Thread-Results-based-on-iteration) |
Results based on iteration - joncfrazier - 05-04-2012 I need to test a wide range of items. One of which is to see if certain links are hidden from certain users. I currently have the test running on iterations based on username/login. Any items not present report a warning. Is there a method to compare iteration with the current action/test and provide a pass/fail report depending on which iteration? RE: Results based on iteration - Shridevi.Salagare - 05-04-2012 Could you please provide some more information and whta exactly is the requirement. RE: Results based on iteration - joncfrazier - 05-04-2012 User A logs in, verify links A, B and C exist, if they exist run a test specific to that link. If they don't exist report failed (but continue testing) User B logs in, verify that links A, C exist and B does NOT exist. Run test on existing links. If A,C do not exist report failed If B does exist, report failed (and possibly do not run test) Rather than making a seperate test for each user, I'd like to parameterize the user login/pw. Here is my current code, though it doesn't do what I want. Only reports a warning if links don't exist. Code: If Browser("...").Page("...").Link("...").Exist (1) THEN RE: Results based on iteration - sshukla12 - 05-07-2012 Hi, Find the attached document it might help u: Let me know if I can help u further[attachment=981] Regards, Sankalp RE: Results based on iteration - joncfrazier - 05-07-2012 Unfortunately I'm not able to download .doc files RE: Results based on iteration - sshukla12 - 05-08-2012 [attachment=983][quote='joncfrazier' pid='20922' dateline='1336400614'] RE: Results based on iteration - joncfrazier - 05-10-2012 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) At least that's my theory, haven't tried it yet 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. RE: Results based on iteration - sshukla12 - 05-10-2012 Gud, finally u come across a solution. that's great. Regards, Sankalp |