Validate UI in Seetest tool

9 replies [Last post]
titasighatak
Offline
Joined: 01/05/2014

Hi,

Please let me know as how to validate Color,font and styles of UI component in Seetest tool.

Regards,
Titasi

support
Offline
Joined: 07/20/2011

You can get the element properties when exporting the code to a testing framework.
First, use the "IsElementFound" command on the text you wish to validate its properties and then use the "getLastCommandResultMap()" command that will return several keys. One of the keys is "color.name" that will return the name of the text color.
Now you will only need to extract the desired information from the map by parsing it.

An example script on Java for example:
client.setDevice("");
if(client.isElementFound("TEXT", "", 0)){
// If statement }
Map map = client.getLastCommandResultMap();
String color = (String) map.get("color.name");

For more information about "getLastCommandResultMap()":
http://experitest.com/studio/help2/WebHelp/getLastCommandResultMap.htm

Other keys that you can use are:
bcolor.name - background color name (for OCR)
bcolor - background color value (for OCR)
color - text color value (for OCR)
font.size - font size (for OCR)

Please note, that it will work only for OCR (zone Text). For other zones (for example: Native/Web) it will not work.

titasighatak
Offline
Joined: 01/05/2014

Hi,

Thanks for the reply.

I am not able to find "getLastCommandResultMap()" command from the list of commands in Seetest tool(right hand side).

Will the command be only available when we export the script to a testing framework??

Regards,
Titasi

support
Offline
Joined: 07/20/2011

Yes the command is only available on the testing framework.
You cannot use it on the seeTest UI.

You can use the generated report though to get the information of this command by going to debug properties tab.

It will presented the information of the getLastCommandResultMap including the color, font and size.

See about it here:
http://experitest.com/studio/help2/WebHelp/Report_Of_Executed_Script.htm

renukasaraswath...
Offline
Joined: 01/29/2015

Hi,

I have tried to get the color of object which is added in repository

Find the below code in C#
IDictionary map = client.LastCommandResultMap;
string color = (string)map["color.name"];

but it gives the output as "UNKNOWN" instead of name of color, Please help me on this

support
Offline
Joined: 07/20/2011

Yes.
Color name property will work only for TEXT recognition.
http://experitest.com/studio/help2/WebHelp/Dynamic_TEXT_Recognition.htm

For other recogntion method it will not work.
Beside that, you have 3rd party limitation on the OCR recognition so it may not work for certain occasions.

priyanka
Offline
Joined: 03/30/2015

Is there any work around to handle this?
how to get image color (no text)?

support
Offline
Joined: 07/20/2011

In order to get the color you may use - Run Native API Call.

seemak
Offline
Joined: 02/07/2017

Hi,
Can you please share details of Run Native API call?
As even I am looking for the option to fetch text color in native app.

arundoss
Offline
Joined: 02/04/2015

Hi,

You can read about RunNativeAPIcall() in the below link:
https://docs.experitest.com/display/public/TD/SeeTestAutomation-+RunNati...

If you have any issues - please send a screenshot and the issue in detail to support@experitest.com as an email.