Validate.NotExist timeout help
Posted: Mon Jan 31, 2011 6:13 pm
So I have the following method I am using to try to validate that a certain repo item is not present but I am having mixed results. Sometimes the method works fine an other times it ignores my timeout of 10s and performs the NotExist immediately (less than 10 ms after the previous action) which fails my test.
I have also tried the following code with the same results.
Am I doing something incorrect? Is there another way I could be performing this check?
Code: Select all
public static void Validate_DropTrack()
{
Report.Info("Validating Track # " + TrackNum + " was dropped");
bool result = Validate.NotExists(repo.FormTacViewC2.PictureTrackInfo.AbsolutePath, 10000, Validate.DefaultMessage, false);
if (result == true)
{
Report.Success("Successfully dropped track # " + TrackNum);
}
else
{
Report.Screenshot();
Report.Debug("Track # " + TrackNum + " failed to drop within 10 seconds, proceeding to next track creation.");
}
}
Code: Select all
public static void Validate_DropTrack()
{
Duration OrigDur = repo.FormTacViewC2.PictureTrackInfo.SearchTimeout;
repo.FormTacViewC2.PictureTrackInfo.SearchTimeout = 10000;
Report.Info("Validating Track # " + TrackNum + " was dropped");
bool result = Validate.NotExists(repo.FormTacViewC2.PictureTrackInfo, Validate.DefaultMessage, false);
if (result == true)
{
Report.Success("Successfully dropped track # " + TrackNum);
}
else
{
Report.Debug("Track # " + TrackNum + " failed to drop within 10 seconds, proceeding to next track creation.");
Report.Screenshot();
}
repo.FormTacViewC2.PictureTrackInfo.SearchTimeout = OrigDur;
}