Access to language properties set by SetLanguagePropertiesFile command

7 replies [Last post]
mligas
Offline
Joined: 01/22/2015

Hi
is it possible to access to properties set by SetLanguagePropertiesFile from C# or Java ?

abharti
Offline
Joined: 02/04/2015

In order to run a test script on several languages, you need to use the The Text Substitution File. The Text Substitution File is a text properties file that allows SeeTest to run the same script for applications that have multiple versions with different languages. In order to create text file, you need to extract a text file from SeeTest studio using extractLanguageFiles() method.

Java Code to create & access Text Substitution file is as follows -
client.extractLanguageFiles("com.experitest.ExperiBank", "C:\\SeeTestLanugage", true);
client.setLanguagePropertiesFile("C:\\SeeTestLanugage\\en.properties");

C# Code to create & access Text Substitution file is as follows -
client.ExtractLanguageFiles("com.experitest.ExperiBank", "C:\\SeeTestLanugage", true);
client.SetLanguagePropertiesFile("C:\\SeeTestLanugage\\en.properties");

Note :- This command can be executed from SeeTest studio as well as Eclipse/MS Visual Studio.

You can refer to our online guide for more detail:
http://experitest.com/studio/help2/WebHelp/Language_Files.htm
http://experitest.com/studio/help2/WebHelp/SetLanguagePropertiesFile.htm

rajeshkumar.jay...
Offline
Joined: 05/07/2018

Whomsoever it may concern.

When tried extractLanguageFiles and setLanguagePropertiesFile in studio for eclipse by copying and pasting TestNG code from SeeTestAutomation it fails to extract the localisation files (Though test steps pass by just capturing screenshot and not extracting the file).

Both setLanguagePropertiesFile fails saying file not found.(Even if i make sure localisation file is present in the direcctory from where setLanguagePropertiesFile needs to pick).

Please advice. Thanks.

arundoss
Offline
Joined: 02/04/2015

Hi,

When working with Eclipse plugin/grid, the file has to be present in the agent machine where the device is connected to.
So, it is better to keep the file in a shared path and provide that path in the command.

rajeshkumar.jay...
Offline
Joined: 05/07/2018

Thanks Arundoss,

Please find details below
SEETEST AUTOMATION ----> When tried with HOSTNAME/IP ADDRESS/MAP the shared directory with local driver Label (ex.. Z:) both extract and set language properties command is working fine

Tried extracting with file path "\\\\HOSTNAME\\Rajesh\\" it fails with error not a valid path

Tried setting language property by placing the property file in shared directory "\\\\HOSTNAME\\Rajesh\\en.properties", this also fails.

Could you please advice how i can make sure the property files gets extracted to device host machine and access the same.

I did tried with System.getProperty("user.dir") in place of Path to check if it gets extracted in host machine(but it fails saying not a valid directory).

If possible could you please share step by step instructions on how to make this localization work in eclipse / grid.

Thanks.

arundoss
Offline
Joined: 02/04/2015

Hi,

We don't have a code snippet for it.
The best way to handle this is in a meeting with our support team and they could guide you on what is wrong with your code.

Please send an email to support@experitest.com and they will help you further.

rajeshkumar.jay...
Offline
Joined: 05/07/2018

Sure, Thanks.

rajeshkumar.jay...
Offline
Joined: 05/07/2018

Sure, Thanks.