SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Member
    Join Date
    Jun 2010
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Help me about Sort in WebTable

    Please help me.How can i check sort in Webtable of one column in order of first character from A > Z or Z > A.Please help me!!!Thanks all very much

  2. #2
    Member
    Join Date
    Jul 2011
    Location
    India
    Posts
    381
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help me about Sort in WebTable

    r=Browser("abc").Page("abc").WebTable("xyz").RowCo unt
    dim arr(r-1)
    for i=1 to r
    arr(i-1)=Browser("abc").Page("abc").WebTable("xyz").getc elldata(i,1)
    next

    asc=true
    for i=0 to ubound(arr)-1
    if arr(i)>arr(i+1) then
    asc=false
    exit for
    end if
    next

    if asc=true
    msgbox " sorted alphabetically"
    else
    msgbox "not sorted alphabetically"
    end if
    <font color="blue">[i]If there is no struggle, there is no progress!

  3. #3
    Member
    Join Date
    Jun 2010
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help me about Sort in WebTable

    Please help me . i can't run your code . QTP displays a error message : IILegal assignment "ASC" .why? help me.thanks very much.

  4. #4
    Member
    Join Date
    Jul 2011
    Location
    India
    Posts
    381
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help me about Sort in WebTable

    sorry, 'asc' is keyword, use any other name 'ascending'
    but you should have figured it out :O
    <font color="blue">[i]If there is no struggle, there is no progress!

  5. #5
    Super Member QAGanesh's Avatar
    Join Date
    Sep 2010
    Posts
    1,898
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help me about Sort in WebTable

    Are u checking for alphabetic sort!!!!
    Thanks,
    Ganesh Iyer
    Winds of Change

  6. #6
    Super Member
    Join Date
    Dec 2005
    Location
    USA
    Posts
    1,407
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: Help me about Sort in WebTable

    you can also use array list and sorting is much easier
    ------------
    Chikki
    when things gets harder ,the harder gets going

  7. #7
    Member
    Join Date
    Jul 2011
    Location
    India
    Posts
    381
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help me about Sort in WebTable

    [ QUOTE ]
    you can also use array list and sorting is much easier

    [/ QUOTE ]
    can you give example, let me see the difference.
    <font color="blue">[i]If there is no struggle, there is no progress!

  8. #8
    Super Member
    Join Date
    Dec 2005
    Location
    USA
    Posts
    1,407
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: Help me about Sort in WebTable

    <font class="small">Code:</font><hr /><pre>
    Set myArrayList = CreateObject( "System.Collections.ArrayList" )
    strRow=Browser("abc").Page("abc").WebTable("xyz"). RowCount
    for i=1 to strRow
    myArrayList.ADD (Browser("abc").Page("abc").WebTable("xyz").getcel ldata(i,1))
    next
    myArrayList.Sort
    </pre><hr />
    ------------
    Chikki
    when things gets harder ,the harder gets going

  9. #9
    Member
    Join Date
    Jul 2011
    Location
    India
    Posts
    381
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help me about Sort in WebTable

    That is cool,
    i searched "arraylist" in qtp help, no information!
    where do i read more about it?
    i am using 9.2 version
    <font color="blue">[i]If there is no struggle, there is no progress!

  10. #10
    Super Member QAGanesh's Avatar
    Join Date
    Sep 2010
    Posts
    1,898
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help me about Sort in WebTable

    Chikki,

    I am clear with the requirement does he want to check the sort is performed or does he intend to sort the values.
    Thanks,
    Ganesh Iyer
    Winds of Change

 

 
Page 1 of 3 123 LastLast

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 02:33 AM.

Copyright BetaSoft Inc.