SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Jan 2010
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Word Count in Webpae

    I have Webpage that displayes webtable with some 10 different field name

    each row is the web elements,

    Iam trying to count the particular word in the web table.

    I tried to get count of all webelement in the document not a particular word

    any help is appreciated.

  2. #2
    Junior Member
    Join Date
    Jan 2010
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Word Count in Webpae

    Hi Srikanth,

    Try the below code.

    tableArray = ..............WebTable("xyz").GetTableData 'It gets the table data to a two dimension array.

    Counter = 0
    For Each cell In tableArray
    If (cell = yourWord) Then 'Check whether the cell data is your word or not.
    Counter =Counter +1
    End If
    Next

    Do let me know if it is working or not.
    Sriram

  3. #3
    Junior Member
    Join Date
    Apr 2007
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Word Count in Webpae

    Try childobjects method and use regularexpression in defining outertext object property

  4. #4
    Junior Member
    Join Date
    Aug 2009
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Word Count in Webpae

    Hi,

    Refer the below example & implement accordingly.

    Expected_Word="SampleData"
    Cnt=0
    rc=Br().Pg().WebTable("xyz").RowCount
    cc=Br().Pg().WebTable("xyz").ColumnCount

    For i=1 to rc
    For j=1 to cc
    Table_Word=Br().Pg().WebTable("xyz").GetCelldata(i ,j)
    If Expected_Word=Table_Word then
    Cnt=Cnt+1
    End If
    Next
    Next

    Msgbox "Word cound in the table :"&Cnt

 

 

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 08:05 PM.

Copyright BetaSoft Inc.