carina icon indicating copy to clipboard operation
carina copied to clipboard

Parametrized constructor for page arent working

Open ashuaviator1987 opened this issue 2 years ago • 0 comments

Describe the bug Carina provides the functionality to have overloaded constructors for a page class. Now the problem is object is not getting created for such constructor. I have narrowed down the root cause in method getConstructorByParams

if (parametersTypes.length != ctorTypes.length) { PAGEFACTORY_LOGGER.debug(String.format("Ctors quantity doesn't satisfy to requirements. Expected: %d. Actual: %d", parametersTypes.length, ctorTypes.length)); } else { if (parametersTypes.length == 0) { requiredCtor = constructor; break; }

here parametersTypes is the additional paramters passed in initPage invocation(Other than driver). But ctorTypes will have all the parameters(It will also include driver). so these two will never match.

This is present in latest version as well. My doubt is, this feature never at all

ashuaviator1987 avatar Aug 16 '22 06:08 ashuaviator1987