Closed spolischook closed 8 years ago
The interface was deprecated as I think it's better to have one way of doing things. However, I can see how the factory can be useful and I'll probably remove the deprecation as 2.0 wasn't released yet.
@spolischook is this the only case where you find the factory useful?
@jakzal this is the only way that we can interact with all pages in one context - it's perfect case because inject more then 100 pages in constructor is weird.
100 pages in constructor is weird.
Or context can be organized in a better way to avoid to many parameter.
@tikolakin It's ok if you have isolate your context in that layer. Ok, let say that, the main disadvantage of DI way with injecting pages in context it's context by itself. I need to create context that can be extended by MinkContext even if it will be empty. Is it ok?
any suggestions?
@spolischook never extend the MinkContext. You can only do it once as otherwise you'll be duplicating step definitions (Behat won't let you). Use the RawMinkContext or MinkAwareContext.
I'll bring back the PageObjectAware before the stable release.
Sorry to interrupt, but when exactly are you going to revert the deprecation? The problem is that we also use your library but can not adopt it to its full extent because of PageObjectAware being deprecated. Thanks in advance.
@old-town @spolischook I'd appreciate if you tested the latest dev-master with your apps. Cheers!
@jakzal we decide use own implementation of ElementFactory. But I still sure that factory is needed, I use it in elements for getting other elements
In our application we have many bundles. Each of bundle can have own Pages (suppose 3 page for every entity that have CRUD). We develop Common context that can interact with any page:
So we strongly needed PageObjectAware interface. Page constructor injection it's great feature, but it is not necessary to oppose - we need both approach for retrieve page objects in context.