Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Operation on a Java Table
#1
Solved: 10 Years, 8 Months, 4 Weeks ago
Hello All,

I am currently automating a Window application built in Java. There I have a JavaTable.

When the page opens, the JavaTable has a variable number of rows (number of rows may vary) and inside the first cell of each row it has a node which when clicked expands to show the subnodes.

My requirement is to click all the nodes present (number of nodes also varies as number of rows varies) and to get a completely expanded JavaTable.

When I am spying the object, it is showing as a JavaTable. I have tried almost all possible ways to click on the nodes. I could do it by "DblClick" method by calculating the co-ordinates of the nodes but it will not solve my purpose as the number of nodes is not fixed.

When I click on a node, all the subnodes are displayed each in individual row and hence the row count increses dynamically.

I have attached a screenshots having 2 images, one is of unexpanded JavaTable which I get at the beginning and another is of the completely expanded JavaTable after clicking all the nodes.

In this screenshot example, number of nodes are 2

Can anybody help me on this ??


Attached Files Image(s)
   
Reply
#2
Solved: 10 Years, 8 Months, 4 Weeks ago
Hi,

1. You have to take rowcount on every iteration of the loop.
2. If rowcount Before expanding Nodes is RC1
rowcount After expanding all nodes is RC2 --> No. of Nodes would be RC2-RC1
3. Try select(Activate) a node using the index.
Reply
#3
Solved: 10 Years, 8 Months, 4 Weeks ago
Hi Sreekanth,

I completely understand what you meant to say here, even I have tried this approach also. But the main problem is I am not able to expand the nodes by any of the available methods,(Click,ClickCell,DblClick,Activate and so on)

For the time being I am able to do this by Click method hard coding the co-ordinates but it will work untill the number of nodes changes
Reply
#4
Solved: 10 Years, 8 Months, 4 Weeks ago
I was considering that if you can "hard-code" in the dimensions to allow you to click a space -- and the space between each of your nodes is equivalent -- and you can count the number of rows per node including the first node.

Then you should be able to calculate the target area where you should need to click based on the number of rows per sub node you have. In this case -- you could "hard-code" in the area that you are to be clicking, by using a calculation based on the total number of nodes and the total number of rows per node.

I hope this is helpful.
Reply
#5
Solved: 10 Years, 8 Months, 4 Weeks ago
What about AcativateRow #N , where N is a number
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading Value from Java Table arjun.singh 8 23,836 10-11-2017, 02:51 PM
Last Post: sivaji
  The DataTable.ExportSheet operation failed. Invalid file. Niraj 2 5,966 05-05-2015, 11:40 PM
Last Post: babu123
  Excel operation - to find usedrange of rows & col pooja 1 9,368 02-19-2015, 04:06 AM
Last Post: supputuri
  Capturing the exact time when an operation is performed. Dilliz 2 2,840 01-09-2014, 03:30 PM
Last Post: Dilliz
  How to capture operation such as hovering a mouse nikhilcogni 5 4,561 03-23-2013, 11:17 AM
Last Post: sams001

Forum Jump:


Users browsing this thread: 1 Guest(s)