I am trying to identify color of cell, every row in my table have different color and based on its color we identify its type. I tried spy but i don't see any property which shows color. I have attached xpath, could you please guild me if there is any way...
Snapshot Location (As its more than 1MB i was unable to upload) - https://drive.google.com/open?id=1WRDlh ... ZSkEwCAx6y
XPath - /form[@name='com.actual_systems.p2.client.GUI.partsearch.foundparts.FoundParts:0']//container[@accessiblename='Found Parts']/?/?/container[@name='scrollPane']/container[1]/table[@name='foundPartsTable']/row[@index='7']
Identify cell/Row color from table.
Re: Identify cell/Row color from table.
Hi,
Unfortunately, the snapshot you posted shows no background color, so it's hard to suggest something reliable how to get it. But it may not mean the background color cannot be obtained from the row/cell in your app? My guess is that you need to use cell and not entire row. I would suggest to start with this post, where you can find some suggestions, how to get a background/foreground/text color from an app...
If you need some more help, I think there is not much anyone here can do without functional sample app (simple hello world with table filled with some mock data and set background color, as in your AUT).
Unfortunately, the snapshot you posted shows no background color, so it's hard to suggest something reliable how to get it. But it may not mean the background color cannot be obtained from the row/cell in your app? My guess is that you need to use cell and not entire row. I would suggest to start with this post, where you can find some suggestions, how to get a background/foreground/text color from an app...
If you need some more help, I think there is not much anyone here can do without functional sample app (simple hello world with table filled with some mock data and set background color, as in your AUT).
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Identify cell/Row color from table.
In our app using legacy Windows controls I recall that I had to retrieve an image of the area on the table and sample the colour at a particular pixel (typically in a corner).
Re: Identify cell/Row color from table.
This may be another possibility but I think there should be a "normal" way for Java swing-based apps, e.g. using GetStyle method or similar? I would definitely try this way before meddling with pixels
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration