diff --git a/src/features/pageObjects/utils/pageObjectTemplate.ts b/src/features/pageObjects/utils/pageObjectTemplate.ts index 0bddf5bb..7c8c1dff 100644 --- a/src/features/pageObjects/utils/pageObjectTemplate.ts +++ b/src/features/pageObjects/utils/pageObjectTemplate.ts @@ -29,11 +29,11 @@ export const getPageObjectTemplateForVidus = ( locators.forEach((it) => { const currentAnnotationType = it.annotationType || annotationType || AnnotationType.UI; - const currentLocatorType = it.locatorType || locatorType || LocatorType.xPath; + const currentLocatorType: LocatorType = it.locatorType || locatorType || LocatorType.xPath; const currentLocatorTypeProperty = _.camelCase(currentLocatorType); pageCode += `variables.${name}.${it.type}.${it.name}=By.${currentLocatorTypeProperty}(${getLocatorPrefix( currentAnnotationType, - currentLocatorType as LocatorType + currentLocatorType // @ts-ignore )}${it.locator[currentLocatorTypeProperty]})\n`; });