简体   繁体   中英

How can the same Coded ui script runs fine on my local dev environment but error out my agent server

I currently have aa script that works fine on my local environment and also on a co-workers local environment. The issue I'm having is when i build it and run it on the agent server i'm receiving the error

SearchProperties: 
Name: Name Value: Application Manager
Name: ControlType Value: TreeItem

Exception: System.ArgumentException: No search information has been specified. To search for a control, you must specify one or more search properties or filter properties. Parameter name: SearchProperties at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.ValidateSearchProperties() at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.get_UIObject()......

Mouse double click on Wintree item

Mouse.DoubleClick(appManag);

Type of Application; - This is on windows application (MSAA) - The test did run at one point on the server agent but stop working and getting
this error for some unknown reason

What I've tried so far

  1. Run the same solution that works on my local environment on the agent server. It works fine on my local server and doesnt on the agent server.
  2. Change the coding multiple times and tested on my local server and run same code again on agent server. Still same error message.
  3. I've googled and the closest thing i found was this related post That post wasn't the exact problem and I tried changing the code some more and it didnt' help.
  4. From the QTAgent iTrace the first message i see is on the line is "Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITest.Extention.IE.XmlSerializers, Version = 12.0.0.0, I don't know why this would be an issue or how to compare it to my workspace?
  5. Lastly the weird thing about this is that at one point my test did work on the server agent.
  6. I've compared my local version of VS with my agent environment the versions are the same except the .NET version are different my .NET version on my agent is 4.5.51650 and the .NET version on my local machine is 4.5.51209.

Well if anyone has experience this and can point me in the right direction i'd greatly appreciate it. Thanks

Will

It looks like you're missing the UI Test Tools Assembly (Microsoft.VisualStudio.TestTools.UITesting.dll) on the agent.

Which version of Visual Studio do you have installed on the agent? According to this question you'll need VS2013 Premium or Ultimate or VS2015 Enterprise.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM