Unable to setLanguageProperties from Appium Studio for Eclipse

1 reply [Last post]
rajeshkumar.jay...
Offline
Joined: 05/07/2018

Unable to setLanguageProperties from AppiumStudio for eclipse. However this works fine within SeeTestAutomation tool.

Code Snippet

1 String fileName = "C:\\en.properties";
2 java.io.File f = new java.io.File(fileName);
3 if(f.exists()) {System.out.println("File Exits");}
4 try{
5 client.setLanguagePropertiesFile(fileName);
6 }catch(Exception e){
7 System.out.println(e.getMessage());
8 e.printStackTrace();
9 }

Above Code Snippet, It says file exists at line 3, but fails with below exception at line 5. Could you please connect with someone who can help me with this.

File Exits
Mon May 21 15:14:37 CST 2018 [main] Set language properties file to: C:\en.properties
Mon May 21 15:14:37 CST 2018 [main] Status: false
Exception caught while executing setLanguagePropertiesFile: Failed to read properties file: C:\en.properties. Failed to set lang properties file.
C:\en.properties (The system cannot find the path specified)

com.experitest.client.InternalException: Exception caught while executing setLanguagePropertiesFile: Failed to read properties file: C:\en.properties. Failed to set lang properties file.
C:\en.properties (The system cannot find the path specified)

at com.experitest.client.JavaClientInternals.executeInternally(JavaClientInternals.java:286)
at com.experitest.client.Client.execute(Client.java:247)
at com.experitest.client.ExecutionClient.execute(ExecutionClient.java:210)
at com.experitest.client.Client.setLanguagePropertiesFile(Client.java:2038)
at com.asiamiles.localization.TestCase3_Localization_Android.testUntitled(TestCase3_Localization_Android.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
at org.testng.TestRunner.privateRun(TestRunner.java:774)
at org.testng.TestRunner.run(TestRunner.java:624)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
at org.testng.SuiteRunner.run(SuiteRunner.java:261)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
at org.testng.TestNG.run(TestNG.java:1048)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)

arundoss
Offline
Joined: 02/04/2015

Hi,

If you're running the tests in grid mode/from Eclipse plugin, please make sure these files exist in the agent machine as well.