Reputation: 45
For some reason unknown to us, our codedUI tests are failing with this error.
"Invalid value for parameter. Value: -1. Parameter: SearchTimeout.\r\nParameter name: SearchTimeout"}
We have created a new ui map and we still get the same error. This failure occurs in the first method we call. All we are trying to go is click on the title bar and send a CTRL+shift+G to the app. I obfuscated the method names and such but aside from that, the code is exactly as I is failing. We did change the search properties to use name = contains... instead of name equals... but this was working fine. I don't think that is it but I have idea what it could be. I don't see any timeout setting. I added the playback settings into the method but that does not seem to affect it any way. It fails too fast and the error implies that the setting is not set.
public void OpenFeatureCustom()
{
Playback.PlaybackSettings.SearchTimeout = 2000;
#region Variable Declarations
WinTitleBar uICompanyNameProductName91064bitTitleBar = this.UICompanyNameProductName91064bitWindow.UICompanyNameProductName91064bitTitleBar;
WinClient uICompanyNameClient = this.UICompanyNameProductName91064bitWindow.UIINTRODG1Window.UIPanelClient.UICompanyNameClient;
#endregion
// fails here Click 'CompanyName ProductName 9.1.0 64-bit(VUL-2872_VGCS) RnD: Env...' title bar
Mouse.Click(uICompanyNameProductName91064bitTitleBar, new Point(595, 6));
// Type 'Control, Shift + g' in 'CompanyName' client
Keyboard.SendKeys(uICompanyNameClient, this.OpenFeatureParams.UICompanyNameClientSendKeys, (ModifierKeys.Control | ModifierKeys.Shift));
}
Thanks in advance mates!
Upvotes: 0
Views: 540
Reputation: 11
It may be because you are resetting your playback settings in your test. Make sure your have the [CodedUITest]
attribute on your test class, then try setting your playback settings in [TestInitialize]
.
Also, make sure if your test class is inherited from a base class with the [CodedUITest]
attribute, that you set your playback settings there, and not in your specific test class.
Upvotes: 1