carina
carina copied to clipboard
Parametrized constructor for page arent working
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