Skip to main content
Solved

TestSdk && TestConnection

  • August 4, 2022
  • 1 reply
  • 131 views

  • Freshman I
  • 4 replies

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.

 

 

Best answer by AaronB

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()

View original
Did this topic help you find an answer to your question?

1 reply

AaronB
Varsity II
Forum|alt.badge.img+1
  • Varsity II
  • 30 replies
  • Answer
  • August 8, 2022

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings