problem when reading blank from excel file
Script is reading first two records correctly but when blank appears on excel file, script does not read and throw an error-
Vb-Script Run Time error
Type Mismatch: 'uName.Keys'
This is my excel file
following is my script-
Set Driver = DDT.ExcelDriver("D:\TCProject\GUITestingAutomation\Stores\TestSheet.xls", "Sheet1")
rec = 0
While Not Driver.EOF()
rec = rec + 1
Call uname.Keys("^a")
Call uname.Keys("[Clear]")
Call uname.Keys(Driver.Value(0))
Call uname.Keys("[Tab]")
Call pwd.Keys("^a")
Call pwd.Keys("[Clear]")
Call pwd.Keys(Driver.Value(1))
loginFrame.btnLogin.ClickButton
if rec = 2 then
'Call aqObject.CheckProperty(Aliases.prowin.dlgMessage.Static, "WndCaption", cmpEqual, Driver.Value(2), True)
strCaption = Aliases.prowin.dlgMessage.Static.WndCaption
If strCaption <> Driver.Value(2) Then
Log.Error("Property value " & strCaption & " does not match data value " & Driver.Value(2))
End If
End if
Call Driver.Next()
Wend
Please suggest.
I would suggest, also, wrapping your calls to the cell data with aqConvert.VarToStr(). That will ensure that a "blank" excel field will actually return a "blank" rather than a NULL value.