0

All of a sudden, my remote executions are throwing

"Initialization method TCS_Automation.CheckoutPaymentPage.CheckoutPaymentVeifyOrderCompleteForAllUsers.MyTestInitialize threw exception. Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: Unable to get reference to the document."

The coded ui tests are linked to TFS work items and are executed through Microsoft Test Manager. No changes to the Test Settings files were made, nor changes to the environment that I'm aware of. Running VS2013 agents and controller. Restarted all agents, then, when that didn't work, restarted the VMs that the agents are running on. Debugging locally doesn't throw the error.

According to my test logs, it's failing in different parts of the test, so it's not specific to a particular webpage.

Ryan Cox
  • 938
  • 1
  • 7
  • 22

1 Answers1

0

The error message is thrown because the agent is unable to interact with the Browser Window. In my particular case, a tracker placed on the site is executing a POST request and is blocking the page load until completion, which prevents interaction. This only happens remotely for some reason (runs > 15 seconds remotely, and < 1ms seconds locally).

Ryan Cox
  • 938
  • 1
  • 7
  • 22