Ask a Question

Dragging of Jtable cell data on to other object

TestQA1
Contributor

Dragging of Jtable cell data on to other object

Hi,

 

I am struggling a lot to use the coordinates with Drag method. The desktop application does not support copy/paste action on the object and we have to drag the data on it.

I have attached an image. So, we have two objects in image, On top right, the object 1 jtable has few rows and we need to drag data from row 1...5 and col 1. (mean all cells in the first col). The height of each cell is 20 i.e each jtable cell is 20 + 20 + 20 and so on.

Now the problem is I am unable to quite understand the parameters in the drag method. Four parameters are required, the first two seems to be working, but last two creating problems in combination with the first two parameters.

 

I'm looking for a solution based on some equation using ScreenLeft and ScreenTop of both objects.

Can anyone help by suggesting an equation by looking at the attached image please. This is something I need to proceed with my next scenarios.

I'm using scripts and BDD scenarios.

 

Thanks in advance. 

3 REPLIES 3
Marsha_R
Community Hero

If you use Object Spy on the top right box, can you see the text that you need in one of the fields?


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

No I don't see the text. Unfortunately the table cells are not editable and neither we can paste data in them. So the AWTComponentAccessibleName is empty.

 

But, for some other objects (where we want to drag something), the AWTComponentAccessibleName stores its title/label.

 

 

It doesn't have to be editable. Just looking for any object property that has the text you want. Post a screenshot of the Extended object spy please and let's take a look.


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
cancel
Showing results for 
Search instead for 
Did you mean: