Hi team, I am facing error while fetching datas from excel in execution time alternatively (one time it's executing and another time it throws error as "excel internal error element not found" And " ...
Here's an example. My Excel spreadsheet looks like this,
And here's JavaScript code to read and open the URLs in Chrome and Edge,
function TestWeb()
{
var excelFile = Excel.Open("C:\\temp\\Websites.xlsx");
var excelSheet = excelFile.SheetByTitle("Websites");
var rows = excelSheet.RowCount;
var cols = excelSheet.ColumnCount;
Log.Message("Rows: " + rows);
Log.Message("Columns: " + cols);
var browsers = ["chrome", "edge"];
for (var x = 1; x <= rows; x++) {
for (var y = 2; y <= cols; y++) {
var url = excelSheet.Cell(y, x).Value
Log.Message(url);
for (var k = 0; k < browsers.length; k++) {
Browsers.Item(browsers[k]).Run(url);
var page = Sys.Browser(browsers[k]).Page("*");
}
}
}
}
Make sure you fully understand what the code is doing, and how it's written, including layout.