SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Apr 2008
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Getting the column number from a javatable

    Hi All,
    I want to double click on each row present in a JavaTable object to check if the subsequent window is opening up or no.

    Say I have a page having 2 rows on it then I need to dblclick on entries present in row 1 and then click on Back (in the browser) and then again dbl click on the 2nd row and check if the next window opens up. Like wise I need to do this for multiple screens with changing number of rows and columns. How do I do it?

  2. #2
    Senior Member
    Join Date
    Apr 2003
    Location
    Wisconsin, USA
    Posts
    5,338
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Getting the column number from a javatable

    What have you tried and why didn't it work?

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

    Re: Getting the column number from a javatable

    Here is the snippet of code.

    What I want is...I have a javatable whose rows keep varying depending on the contents the earlier table has.

    e.g I will get 3 horizontal rows of data the first time and may be 3 or more rows on the next click (its dynamically changing).
    So I want to put a loop (variable 'j'used below) to iterate through the table till the number of rows a java table is having. However Row.count is yielding me the column numbers and not the number of row

    'Assiging the values
    Set Table = JavaTable("Index=1")
    Dim TabItems As TItems
    Set TabItems = Table.Items
    Dim Row As Object
    Dim j As Integer
    Dim TableContents(10)
    j = 0
    For Each Row In TabItems

    For col_num = 1 To Row.count
    While j < Row.count
    j = j + 1
    JavaTable("Index=1").SelectIndex j, col_num, tpMouseDoubleClick
    Sleep 5, tpPauseSeconds
    If IEWindow("BankDataManagement").Exists = True Then
    TestLog.Comment "Opened the data in detail"
    Else
    TestLog.Comment "No Data Found"
    End If
    JavaButton("Index=2").Click
    Sleep 5, tpPauseSeconds
    TableContents(j) = Row.Item(col_num)
    Wend
    Next

    Next

  4. #4
    Senior Member
    Join Date
    Apr 2003
    Location
    Wisconsin, USA
    Posts
    5,338
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Getting the column number from a javatable

    Why are you relating column numbers with row numbers?

    For col_num = 1 to Row.count

    Is the table always exactly square? If so, the number of columns and rows will be the same.

  5. #5
    Junior Member
    Join Date
    Apr 2008
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Getting the row number from a javatable

    First of all sorry for the goof up in the variable names as well as the topic name. I have tried out variety of things to get this working and hence this crazy exchange of names in variables (rows and columns).

    No the table is not an exact square everytime, thats what bothers me. All I want is:-

    Getting number of rows as well as column in a java table using test partner, so that I can put a for loop for the 2 dimensions and navigate through it.

  6. #6
    Senior Member
    Join Date
    Apr 2003
    Location
    Wisconsin, USA
    Posts
    5,338
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Getting the row number from a javatable

    Then why not a construct such as this?

    <font class="small">Code:</font><hr /><pre>
    For Each Row in TabItems
    For Each Column in TabItems
    Next
    Next
    </pre><hr />

 

 

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 11.11%
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 10:03 PM.

Copyright BetaSoft Inc.