Why is the "else" code inside the "IsPresent()" function not getting executed in Protractor with Jasmine framework? The "IF" code works fine, but when I provide a value from an Excel file, the execution stops at the "IF" block. Any suggestions on why it's stuck and not moving forward would be appreciated.
Note: Recursion is used to read values from the Excel file and print the output based on the index.
Here is the code snippet:
import { browser, protractor, element, by, By, ElementArrayFinder, ElementFinder } from "protractor";
import { Workbook } from "exceljs";
import { exists } from "fs";
describe('Search PID', () => {
var Excel = require('exceljs');
var wrkbook = new Excel.Workbook();
wrkbook.xlsx.readFile("Path to the excel file");
beforeAll(() => {
browser.ignoreSynchronization = true;
browser.get('My App URL');
});
function PIDMatching(value, index) {
// Function logic here...
}
fit('Navigation', () => {
// Test case logic here...
});