'Tricentis Tosca

I just started with Tricentis Tosca Automation specialist level 2 training and got stuck after instantiation of template I am getting the following error in scratchbook :

Log info:
The browser was not ready after 10000 ms. Please refer to the setting (TBox.Synchronization.SynchronizationTimeout) or the testconfiguration parameter (SynchronizationTimeout)

Detail:
Tricentis.Automation.Engines.Adapters.Controllers.Html.BrowserNotReadyException: The browser was not ready after 10000 ms. Please refer to the setting (TBox.Synchronization.SynchronizationTimeout) or the testconfiguration parameter (SynchronizationTimeout)
   at Tricentis.Automation.Engines.Adapters.Controllers.Html.HtmlRootAdapterController.CheckForBusyTabs(IList`1 technicals, IList`1 foundDocumentAdapters)
   at Tricentis.Automation.Engines.Adapters.Controllers.Html.HtmlRootAdapterController.SearchInternal()
   at Tricentis.Automation.Engines.Adapter.Controllers.Html.IERootAdapterController.SearchInternal()
   at Tricentis.Automation.Engines.Adapters.Controllers.AdapterController.Search()
   at Tricentis.Automation.Engines.Representations.Controllers.RepresentationController.SearchAllRepresentations(IAdapterController adapterController)
   at Tricentis.Automation.Engines.Representations.Controllers.RepresentationController.SearchRepresentations(IAdapterController adapterController)
   at Tricentis.Automation.Engines.Representations.Controllers.RootRepresentationController.SearchRepresentation()
   at Tricentis.Automation.Engines.Representations.Controllers.RepresentationController.Search()
   at ᜃ.ᜀ(IRepresentationController A_0)
   at ᜃ.ᜁ(IRepresentationController A_0, IRepresentation& A_1)
   at ᜄ.ᜀ(IRepresentationController A_0, IRepresentation& A_1)
   at ᜃ.ᜀ()
   at Tricentis.Automation.Execution.Synchronization.RepresentationTestActionSynchronizer.Retry()
   at Tricentis.Automation.Execution.Synchronization.Synchronizer`1.DoSynchronize(InterfaceType interfaceType)

Can anybody point me out to where should I be making corrections?



Solution 1:[1]

I am not sure whether you are getting this error because of Instatiation, however it seems to be a synchronisation issue while execution.

If its an synchronisation issue then, you can resolve this in 3 ways -

  1. You can put an static wait after the step of launching the application , for this use TBox Wait (before performing this please try 2nd point, as we highly recommend Dynamic waits to improve execution performance)

  2. You can use dynamic wait in your script. Steer any control on your webpage and perform a validation (visible/enable/exist == True) with action mode “WaitOn”

  3. You can increase the synchronisation setting in Tosca Commander ( this is not recommended as it will impact on overall execution)

Solution 2:[2]

enter image description here

Please follow these steps:

  1. Go to PROJECT > Settings
  2. On the Settings window, navigate to Settings > TBox > Synchronization
  3. Click on Synchronization
  4. You'll find Synchronization Timeout and Synchronization Timeout during WaitOn
  5. Set those values accordingly.

enter image description here

Solution 3:[3]

Diffcult to say, because of the misssing Information on the testcase and action that is peformed but with tosca you have to be careful about everything.

For Example:

  • there should be only one open instance of the browser (close if tosca does not automatically
  • mabye your test objekt has a really long respond times (you can change waiting time for tosca)
  • try different browser

I don't know what exactly causing your problem, but i was a trainer for Tosca and in class we had this all the time and the solution was always a little bit different depending on the pc.

Solution 4:[4]

You can set Synchronization Timeout and Synchronization Timeout during WaitOn under project> setting> tbox but that would be same time for all of your test. You can add Synchronization Timeout and Synchronization Timeout during WaitOn to your TCP and provide time in msec as per your element load time.

Solution 5:[5]

I had the same error some time ago, because some browser security setting from my company was delaying the calls to the test URL. You are getting the error because your first call to open up the browser (I think it's called "open URL") takes longer than 10 seconds to resolve.

You change try the following:

  • change your configuration settings to a number higher than 10000ms. Please note that this will affect the timeouts of ALL failing steps. This is not recommended in a "real world" scenario.
  • navigate manually once to the page and see if the info gets cached (it might need less than 10s on the second attempt)
  • disable the first step and navigate manually to the page, wait till it loads up then run the whole test. This is of course also not recommended in a real world scenario, but IMHO it is the best option in your case.
  • try another browser: that sometimes does the trick

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Dharman
Solution 3 Malte Kleimann
Solution 4 shailesh yadav
Solution 5 PLB