As in this part of the code world.js:100 the page objects are created before the shared object, therefore if a shared property / method is needed inside of a page object n definition time the system crashes with a not defined error.
Is there is any specific reason why this is done in this way?
I think has more sense to do it in the other way around. Think in the scenario where you would like to create some abstract shared object.
In my case I was trying to augment the object by adding a customised locator, I defined in a utils shared object and when trying to use my customised locator in a page object as defined in the how to, it fails due the page object get created before shared objects.
As in this part of the code world.js:100 the page objects are created before the shared object, therefore if a shared property / method is needed inside of a page object n definition time the system crashes with a not defined error.
Is there is any specific reason why this is done in this way?
I think has more sense to do it in the other way around. Think in the scenario where you would like to create some abstract shared object.
In my case I was trying to augment the object by adding a customised locator, I defined in a utils shared object and when trying to use my customised locator in a page object as defined in the how to, it fails due the page object get created before shared objects.