Puppeteer el.executionContext is not a function error

I am trying to write Application Test for the project but i am getting an error when I try to get the background colour of the element

await I.seeCssPropertiesOnElements(schedulerSelector.flightLegSlotClass, { 'background-color': expectedColour});

or

let bgColor = await I.grabCssPropertyFrom(schedulerSelector.flightLegInnerSlot, 'background-color')
I.assertEqual(bgColor, 'red');

My selector is working correctly because I.seeElement or I waitElement is working. Not getting any error.

So the error I am getting is : el.executionContext is not a function

The code is working if use this code but i want to use 2 of the mention code above.

  const element = document.querySelector(selector);
  return window.getComputedStyle(element).getPropertyValue('background-color');
}, schedulerSelector.flightLegSlotClass);```


Could you please help me.