Reputation: 11
getting Bitmap exception on captureBitmap() method for desktop application in silktest workbench
With _desktop.FormsWindow("AppMainWindow")
.CaptureBitmap("C:\Snapshots\ErrorImage.PNG")
.PushButton("buttonOK").Click()
End With
Exception:
Silk Test Workbench
Playback error in the .NET Script 'TestSuiteDriver':
SilkTest.Ntf.BitmapNotStableException:
Bitmap failed to stabilize.
added the below code in vb.net script.
Agent.SetOption(Options.BitmapMatchCount, 0)
Agent.SetOption(Options.BitmapMatchInterval,0)
Agent.SetOption(Options.BitmapMatchTimeout,0)
but still getting the exception.
Need to configure something in the Silk Test Workbench?
Upvotes: 0
Views: 89
Reputation: 11
"SilkTest Open Agent" is a background process running locally when silk test workbench tool is opened.
Stopped the already running open agent, and re-run the new Open Agent process and executed the script. It fixed the "BitmapNotStableException".
Upvotes: 0
Reputation: 617
I would increase the timeout to something larger and the match interval as well. That way it gives the Workbench more time to detect the bitmap. Setting them all to zero means it will check once and then stop.
Upvotes: 0