-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuration workaround needed to allow for modular, per-page elements #76
Comments
@walterdolce I've got this type of organization. I've simply defined my
that work as you expect
|
Just FYI, in future versions I'd like to reference page objects by FQCN rather than their name by default. |
Cool, when new version comes out, I'll remove my |
@jakzal if you want, I can try to make an implementation for FQCN. Something like: check if it's a valid (existing) one, check if it's an instance of that type (interface) and, then, return it. Maybe I can make a PR with RFC status. Let me know if you agree with this :) |
Sure, PR would be nice :) Could be as simple as returning the class right away if it exists from the existing implementation, or a new implementation. |
I'll close this one as since FQCN is implemented you can put your page objects anywhere. |
Hi,
In order to achieve something like the following in terms of code/folders structure:
It seems like the configuration setup below is necessary for the extension to work - note the empty namespace declaration for the elements:
Otherwise, an error like the following would be thrown:
Is the need to configure an empty namespace the only way to make the extension happy?
Would it make sense to have the extension just get the element class based on what's passed to the
Page::getElement
method (after perhaps checking the existence in the "base namespace", so to avoid breaking other people's code out there....), like so:Note this is not a declaration of a bug. Rather a genuine question as to what's the best way to achieve separation of components on a page basis (because not all pages have the same elements and namespacing them after the page they're contained within makes sense and gives a sense of cleanliness and structure - IMO).
Thanks
The text was updated successfully, but these errors were encountered: