-1

I am learning tosca and currently we are trying to run a regression test suite for a legacy Java Swing application.

My Test suite contains 4 modules (in JTree) and it is getting failed while clicking a node.

The Error I received on the module is,

at.tosca.javaengine.common.exceptions.ControlException: node or node-path not found!
Detailed information contained in 'JavaEngineException.txt
above message is displayed in Executionlist

JavaEngineException.txt

22-11-2017 - 17:56:37: IExecWrapperInterface_connectToControl
at.tosca.javaengine.common.exceptions.ControlNotFoundException: Unable to find control Index=3;ClassName(s)=[javax.swing.JTable];.

at.tosca.javaengine.server.tree.ComponentSearch.getComponent(ComponentSearch.java:218)
->at.tosca.javaengine.server.AbstractJavaEngineCore.findComponent(AbstractJavaEngineCore.java:1129)
->at.tosca.javaengine.server.AbstractJavaEngineCore.connectToControlInternal(AbstractJavaEngineCore.java:936)
->at.tosca.javaengine.server.AbstractJavaEngineCore.connectToControlInternal(AbstractJavaEngineCore.java:922)
->at.tosca.javaengine.server.AbstractJavaEngineCore.connectToControl(AbstractJavaEngineCore.java:313)
->at.tosca.javaengine.server.JavaEngineCore.access$101(JavaEngineCore.java:25)
->at.tosca.javaengine.server.JavaEngineCore$2.runInternal(JavaEngineCore.java:69)
->at.tosca.javaengine.server.control.WorkerThread.run(WorkerThread.java:69)
->java.lang.Thread.run(Unknown Source)
->JNIServer::CallVoidMethod
->CJNIServer::CallVoidMethod

22-11-2017 - 17:58:58: IExecWrapperInterface_setValue
at.tosca.javaengine.common.exceptions.ControlException: node or node-path not found!

at.tosca.javaengine.server.control.swing.GenericTreeControl.setValueLegacy(GenericTreeControl.java:339)
->at.tosca.javaengine.server.control.swing.GenericTreeControl.setValue(GenericTreeControl.java:88)
->at.tosca.javaengine.server.AbstractJavaEngineCore.setValueInternal(AbstractJavaEngineCore.java:1195)
->at.tosca.javaengine.server.AbstractJavaEngineCore.setValue(AbstractJavaEngineCore.java:686)
->at.tosca.javaengine.server.JavaEngineCore.access$401(JavaEngineCore.java:25)
->at.tosca.javaengine.server.JavaEngineCore$5.runInternal(JavaEngineCore.java:114)
->at.tosca.javaengine.server.control.WorkerThread.run(WorkerThread.java:69)
->java.lang.Thread.run(Unknown Source)
->JNIServer::CallVoidMethod
->CJNIServer::CallVoidMethod

NOTE : The same Test suite is working in some other machine and not here. Both are same operating System.

Praveen
  • 1,791
  • 3
  • 20
  • 33

2 Answers2

0

This is a bit confusing. Looks like you are connecting to a JTable and then trying to select a node? Are you sure Tosca is finding the correct control on both machines? (Index=3 does not sound like a stable identification.

antipodos
  • 316
  • 1
  • 4
  • Thanks for your reply. Yes, But I am not sure then how it is working in one machine and not in another. Well regarding the logs, thats what all I have got. Is there any way to explore more on this problem to identify the root cause? – Praveen Nov 27 '17 at 06:46
0

The problem was TOSCA is faster than our application :)

Meaning: The frame was not loaded at the time when TOSCA was trying to scan the next page causing the error, the specific node was not found.

Solution: I added a TBoxWait with extra seconds, after that this is working fine.

piet.t
  • 11,718
  • 21
  • 43
  • 52
Praveen
  • 1,791
  • 3
  • 20
  • 33
  • I would suggest using a WaitOn with a condition of Exist == True to verify a specific object is loaded (if possible). That way Tosca will continue execution immediately after the object is found instead of waiting an arbitrary, hard coded amount of time. – Neitherman Feb 28 '20 at 16:15