nastester
2 years agoRegular Contributor
Keyword test not working as Script test
I have Keyword tests which compare Excel workbook values to the frontend web application using the Excel Read Value and Compare Property operations.
These Keyword tests work fine but when converting them to a script they do not and I get this error. Does anyone have any insight as to why?
Example script:
//USEUNIT HelperScripts
function FR_Rollup()
{
var Var1, LastResult, LastResult1;
Var1 = "";
changeDashboardLanguage("French");
Browsers.CurrentBrowser.Navigate(ProjectSuite.Variables.url);
Delay(500);
LastResult = Excel.Open(ProjectSuite.Path + "Dashboard_translations_COMPLETE.xlsx").SheetByTitle["fr_FR"].CellByName["C37"].Value;
Var1 = LastResult;
aqObject.CompareProperty(Aliases.browser.pageDashboard.panelAllDispatchesStatusText.contentText, 0, Var1, true, 3);
LastResult1 = Excel.Open(ProjectSuite.Path + "Dashboard_translations_COMPLETE.xlsx").SheetByTitle["fr_FR"].CellByName["C38"].Value;
Var1 = LastResult;
aqObject.CompareProperty(Aliases.browser.pageDashboard.panelUploadPendingStatusText.contentText, 0, Var1, true, 3);
}
Replace the square brackets with round brackets in your code, and it will work.