SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    May 2004
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    use of variable in expected result of html table

    Hi all,
    Im testing a web based application and i have a situation in which i have to pass a parameter in the expected results value. The object is a html table. I tried using the GUI checkpoint for object/window. I guess using this option we can check static actual results but in my situation the actual result is dynamic.
    For ex. file name that will be saved will be the expected result and this file name keeps on changing for each test run.

    Can any one please help me...

    Thanks in advance
    Regards,
    Sudhagar Singh

  2. #2
    Member
    Join Date
    Aug 2003
    Location
    india
    Posts
    50
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: use of variable in expected result of html table

    Hi
    I too facing the same problem and looking for a solution but till now did not get anything.

    I am using winrunner 7.6 with web add-ins.

    I am trying to use gui checkpoint for a table, for one column i want to give input value as a variable instead of the hardcode string value
    as i am using a for loop and the expected value get changed as per the loop iteration so i want to compare the actual value of gui checkpoint
    with the expected value (which is getting changed as per loop iteration)

    i tried using &varname but it is considering this as a string instead of variable name;

    If anyone of you have faced same prob then pls suggest some solution

    Dinesh

  3. #3
    Senior Member
    Join Date
    Sep 2002
    Location
    Delhi
    Posts
    228
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: use of variable in expected result of html table

    Hi
    Instead of using check points code the situation.

    Get the value from the HTML table using tbl_get_cell_data function and then compare the value obtained with the value saved in a variable which is your expected value and use tl_step to output the results

  4. #4
    Member
    Join Date
    Aug 2003
    Location
    india
    Posts
    50
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: use of variable in expected result of html table

    ya
    coding is possible but that is quite lengthy and maintainance is tough as there are many pages so many checkpoints required. application is changing so fast that we will be busy in changing the code

    gui checkpoint is quite easy and in one checkpoint we can check complete table. it is fine for static data but looking for variable data if there is any way else coding is always there

    No harm in exploring if anyone knws how to use variable in checkpoint

  5. #5
    Senior Member
    Join Date
    Sep 2002
    Location
    Delhi
    Posts
    228
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: use of variable in expected result of html table

    If you know the expected results before hand , you can also make changes in the Expected results.

    Run the Test in Verify mode once. Open Winrunner results. Open the GUI check point results and modify the expected value.

  6. #6
    Member
    Join Date
    Aug 2003
    Location
    india
    Posts
    50
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: use of variable in expected result of html table

    i want to automate that as for one run i have 100 projects in loop so now manually i have to change the checkpoint 100 times that is not possible

  7. #7
    Member
    Join Date
    Dec 2002
    Location
    Soquel, CA 95073
    Posts
    40
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: use of variable in expected result of html table

    Create a function that mimics a check-point: get all the data from the table, save the results to a file, and then do a file_compare with the baseline file....

    For the variable values that need to be replaced, pass an array of values to be replaced and what the new value should be.... (I do this a lot, using a variable to get the current date, and replacing the current date in the results with the fixed string 'SYSDATE'.)

    Or as mentioned above, create a pre-processor to automatically update the baseline results.

    Or given that it is a filename, get the filename from the table and programmatically compare it with the filename on the disc...

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:10 AM.

Copyright BetaSoft Inc.