SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7

Thread: need some logic

  1. #1
    Senior Member
    Join Date
    Dec 2007
    Posts
    206
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    need some logic

    I am working on webbased application in which there is a webtable.in this in column no 3 some data should be displayed.My requirement is it should not be displayed more than 3 times ( same data).Here i used getcelldata(i,3)to fetch cell content and stored in a variable.How can i validate that same data should not displayed more than 3 times..

    Thanks..

  2. #2
    Member
    Join Date
    May 2005
    Location
    Pune
    Posts
    472
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: need some logic

    Put a counter, everytime you find the particular data,
    i) increment the counter by 1 and
    ii) compare whether it is the fourth (or more) time that the data is repeated.
    iii) If it is the fourth (or higher) time that the data is displayed, put a fail statement.

    You can continue with the test-case instead of stopping, as this is the thumb rule (atleast as per me) to continue the test - unless we encounter some fatal error. That will help in batch runs.

  3. #3
    Senior Member
    Join Date
    Dec 2007
    Posts
    206
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: need some logic

    Thanks.. I not understading..can you give me the code

  4. #4
    Moderator ifraser's Avatar
    Join Date
    Jul 2004
    Location
    Brisbane, Australia
    Posts
    2,090
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: need some logic

    [ QUOTE ]
    Thanks.. I not understading..can you give me the code

    [/ QUOTE ]

    The contributers to this forum are not here to do your job for you. If you look in the FAQ section there are plenty of examples or links that will lead you to answers.
    You can buy my Art from: "Post Cards now available"
    Ian Fraser Landscape Photography
    World Wide Shipping.

    http://mowogman.wordpress.com/

  5. #5
    Senior Member
    Join Date
    Dec 2007
    Posts
    206
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: need some logic

    Hi Fords,

    I searchrd forum before entering my post.I did.t found any related topic,Can you provide link ..

    Thanks

  6. #6
    Moderator ifraser's Avatar
    Join Date
    Jul 2004
    Location
    Brisbane, Australia
    Posts
    2,090
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: need some logic

    [ QUOTE ]
    Hi Fords,

    I searchrd forum before entering my post.I did.t found any related topic,Can you provide link ..

    Thanks

    [/ QUOTE ]

    You might actually have to do some reading but the answers are there.

    http://www.sqaforums.com/showflat.ph...e=0#Post402552

    I have been hanging around on this forum for a while now and very few of the questions being asked at the moment are new questions.
    You can buy my Art from: "Post Cards now available"
    Ian Fraser Landscape Photography
    World Wide Shipping.

    http://mowogman.wordpress.com/

  7. #7
    Advanced Member
    Join Date
    Sep 2007
    Location
    Chennai, Tamil nadu, India
    Posts
    999
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: need some logic

    You asked logic, you got it!!!!!

    but you are asking code... its a simple logic, basic scripting knowledge is enough.

    anyway try below code

    <font class="small">Code:</font><hr /><pre>counter = 1
    for i = 1 to 4
    ExpectedValue = obj.getcelldata(i,3)
    counter = counter+1
    if ExpectedValue &lt;&gt; null and counter &gt;3
    print "Fail"
    else
    print "Pass"
    end if
    next</pre><hr />
    i have never seen bugs sleeping

 

 

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 06:38 AM.

Copyright BetaSoft Inc.