-1

Little background. I am using test complete and java scripting language for automating the java based desktop application.

I need to click on the row in the table depending on the image colour. If image colour is red it need to be passed and only green should be clicked.

I tried most of the function is test complete none of these returns me image colour.

Do anyone have an idea how do i do this.

Ripon Al Wasim
  • 36,924
  • 42
  • 155
  • 176
Automate
  • 1
  • 2
  • Use `Robot` to capture a screen shot of the area you need to investigate, inspect the pixel information of the resulting `BufferedImage` – MadProgrammer Mar 04 '15 at 23:05
  • Test complete take the screen shot of whole area its unable to take screen shot of just the cell in the table – Automate Mar 10 '15 at 23:25
  • It can, but you need to understand that component location details in contextual to it's parent and you will need to convert that information to screen coordinates... – MadProgrammer Mar 10 '15 at 23:27

2 Answers2

0

This task does not seem to be a usual standard functionality of a GUI testing tool. So, you need to implement this feature using JScript yourself. In general, algorithm is this: get the list object and iterate through its displayed rows working with them as with native Java objects. Use the native field or method to test the current row's color and if the color is appropriate, perform an action of this color. You can get an identified of this native row object and use this identifier to interact with the row with TestComplete's means.

Cannot be more specific due to lack of specific information on the controls used in your application.

Dmitry Nikolaev
  • 3,803
  • 2
  • 19
  • 23
0

Almost every TestComplete on-screen object has reflected upon it the Picture method. You could look at a pixel within that picture object to determine the appropriate color, and then click on that row.

  • Look at some of the advanced properties of the table object. You may be able to see into the rows and columns to find another property you can use to get that information. – Will Fetherolf Mar 12 '15 at 17:17