Solved

TestSdk && TestConnection

  • 5 August 2022
  • 1 reply
  • 104 views

Wondering how to use the TestConnection on a few different screens,  the behavior seems the same for them all.    Filling in a form with valid data,  will then invoke TestConnection.   From the UI, sure the respective dialog box  appears.  But the test code, not sure how to handle it.   Meaning nearly immediately an exception is thrown. 

I’ve tried with:
ctpSetup.TestConnection();

ctpSetup.TestConnection(true,"Successfully Connected to ClickToPay Server");   

 

While the exception text is:

 

ex.Message == “Long operation failed, did not start or resulted in a redirect, timer control is not available”  

 

Not sure how to invoke the TestConnection() as it is a void, could understand if it allowed chaining some kind of Wait, but as a void…  Sure there is something i’m missing…  Couldn’t find anything the the TestSDK.pdf, the discussion forms here,  or anywhere covering this…  Is there a better more specific forum for the TestSDK?

 

Thanks in advance.

 

 

icon

Best answer by AaronB 8 August 2022, 17:25

View original

1 reply

Userlevel 4
Badge +1

Hi Dand,

It looks like the TestConnection gets clicked, but fails on MessageBox.Ok() due to no wait action.

Here is how to manually add the wait action to the test inline.

ctpSetup.TestConnection();
ctpSetup.MessageBox.WaitAction = Wait.Wait.WaitForLongOperationToComplete;
ctpSetup.MessageBox.Ok();

Or you can add it to the extension file using something like this

public ctpSetup()
{
MessageBox.WaitAction = Wait.Wait.WaitForLongOperationToComplete;
}

If it still doesn’t work, please share your wrapper code for TestConnection()

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved