VBA error in Navigation Editor (but OK with e-Tester)
Has anyone ever encountered an "afterPlay VBA_BRKREASON_Error" when trying to run a script with Custom VBA and using the Navigation Editor?
The script works fine in regular e-Tester, but when using the Navigation Editor (testing for use with e-Load), it gives me an error.
The following is a code exerpt from the page which fails:
Private Sub RSWVBAPage_afterPlay()
Dim x As Integer
Dim tempArray As Variant
Dim errorArray As Variant
Dim sleeper As RSWWait.clsSleep
Set sleeper = New RSWWait.clsSleep
tempArray = Split(csvArray(0), ",")
' tempArray(1) will be the "|" separated error strings to match.
errorArray = Split(tempArray(1), "|")
For x = 0 To UBound(errorArray)
If RSWApp.FindInHtml(errorArray(x)) Then
' tempArray(2) is the time to wait each time you find a match.
sleeper.wait (tempArray(2) * 1000)
The idea behind all this is I am processing an input file before the script starts playing (the procedure for processing the input file is declared in the object 'ThisScript'). This input file contains all the error strings and is stored in 'csvArray'. I then look for the error strings using the FindInHtml function.
It's weird that it works in e-Tester but not in the Navigation Editor.
Re: VBA error in Navigation Editor (but OK with e-Tester)
Not sure if this is way off base, but I got some information on the wait/sleep dll. Empirix mentioned to me that all that really does is pause the processor...so it doesnt not really let any action occur while its paused.
Maybe this pausing is causing it to hangup? In any case Empirix support helped me write a nice little function that allows you to wait for as many seconds as you specify so things have time to load.
Please check out one of the recent threads on delay or waiting where I copied this over already.