0

Am running automation on terminal emulator IBM PCOMM application, framework consists , maven + leanft +cucumber+ java + junit , when i run the feature from runner file , i am able to execute the tests , but when i using maven command through command prompt , it is opening the application but not able to type anything

maven command:

mvn clean  verify -Dcucumber.filter.tags="@Mainframe"

below is the command used for launch :

        ModifiableSDKConfiguration sdkConfig = new ModifiableSDKConfiguration();
        sdkConfig.setServerAddress(new URI("ws://localhost:5095"));
        SDK.init(sdkConfig);
        File file = new File(filePath);
            java.awt.Desktop.getDesktop().open(file);

to insert text :

screen.describe(Field.class,
            new FieldDescription.Builder().startPosition(row, col).isProtected(false).visible(true).build())
            .setText(text);
screen.sync();

Leanft version : 14.53

Screen logic:

Window teWindow = Desktop.describe(Window.class, new WindowDescription.Builder().shortName(new RegExpProperty(".*")).build()); 
Screen screen = teWindow.describe(Screen.class, new ScreenDescription.Builder().label(new RegExpProperty(".*")).build()); 

Error:

com.hp.lft.sdk.ReplayObjectNotFoundException: Cannot find the "Terminal Emulators Field" object's parent "Terminal Emulators Window" (class TeWindow). Verify that parent properties match an object currently displayed in your application.

If i try opening application with LeanFT Terminal Emulator Technology , am getting below error :

com.hp.lft.sdk.GeneralLeanFtException: spawn UNKNOWN
    at com.hp.lft.sdk.internal.GeneralExceptionFactory.createDefault(GeneralExceptionFactory.java:154)
    at com.hp.lft.sdk.internal.GeneralExceptionFactory.createDefault(GeneralExceptionFactory.java:8)
    at com.hp.lft.sdk.internal.CommunicationClientImpl.handleError(CommunicationClientImpl.java:224)
    at com.hp.lft.sdk.internal.CommunicationClientImpl.send(CommunicationClientImpl.java:96)
    at com.hp.lft.sdk.internal.AutLaunchHelper$1.invoke(AutLaunchHelper.java:80)
    at com.hp.lft.sdk.internal.AutLaunchHelper$1.invoke(AutLaunchHelper.java:61)
    at com.hp.lft.sdk.internal.TestObjectOperationWrapper.executeWithEvents(TestObjectOperationWrapper.java:120)
Adelin
  • 7,809
  • 5
  • 37
  • 65
Rahul
  • 239
  • 1
  • 9
  • 21
  • and what is the error thrown? also, do you really need to set a server address manually? – Adelin Jul 29 '20 at 07:02
  • Hi @Adelin , this is the error am getting : com.hp.lft.sdk.ReplayObjectNotFoundException: Cannot find the "Terminal Emulators Field" object's parent "Terminal Emulators Window" (class TeWindow). Verify that parent properties match an object currently displayed in your application. – Rahul Jul 30 '20 at 14:56
  • And yes even don't set the address , i am getting another error , com.hp.lft.sdk.GeneralLeanFtException: An Internal problem has occurred, please make sure the LeanFT sdk was properly initialized. at com.hp.lft.sdk.internal.CommunicationClientImpl.send(CommunicationClientImpl.java:72) – Rahul Jul 30 '20 at 15:00
  • @Adelin : any suggestion here ? – Rahul Jul 31 '20 at 06:37
  • what is `screen`? and it looks like java awt is used to launch the app instead of TE technology. Is the TE enabled in the engine settings? – Adelin Jul 31 '20 at 09:28
  • Yes , i enabled TE , i made screen as generic , "Window teWindow = Desktop.describe(Window.class, new WindowDescription.Builder().shortName(new RegExpProperty(".*")).build()); Screen screen = teWindow.describe(Screen.class, new ScreenDescription.Builder().label(new RegExpProperty(".*")).build()); screen.sendTEKeys(Keys.ENTER); screen.sync();" – Rahul Jul 31 '20 at 15:41
  • can you help launch the application with TE technology ? snippet please ? – Rahul Jul 31 '20 at 15:42
  • com.hp.lft.sdk.GeneralLeanFtException: AUT launch is not allowed. Verify that the AUT is configured in autConfig.json. fileName=C:/ProgramData/IBM/Personal Communications/TN3270.WS, args=[undefined], workingDirectory=undefined – Rahul Jul 31 '20 at 18:44
  • { "allowedAuts": [ { "fileName": "C:\\ProgramData\\IBM\\Personal Communications\\TN3270.WS" } ] } – Rahul Jul 31 '20 at 19:18
  • @Adelin : Can you help me on this please ? – Rahul Aug 03 '20 at 11:38
  • please edit the question to add the details I asked for. Comments are terrible to read. Use markdown to highlight code – Adelin Aug 05 '20 at 08:53
  • @Adelin: Done ! Please let me know if you need any other info. – Rahul Aug 05 '20 at 10:09
  • did you follow these steps? https://admhelp.microfocus.com/uftdev/en/14.50-14.53/HelpCenter/Content/HowTo/TE_Addin_Overview.htm – Adelin Aug 05 '20 at 12:52
  • Run \bin\TeConfigurator.exe. , except this step , i made sure engine is up and running , added Addin for terminal emulator , as i said am able to run with eclipse with JWT Desktop , only problem is when running through maven command from command prompt. Do you think java is causing this issue ? i See , lean FT java is getting initialized when running from eclipse. – Rahul Aug 06 '20 at 06:30
  • Run \bin\TeConfigurator.exe i couldn't find this exe file , my leanFT got installed with UFT package. – Rahul Aug 06 '20 at 06:31

0 Answers0