-
Notifications
You must be signed in to change notification settings - Fork 286
Open
Labels
Milestone
Description
In the 1.x versions it was possible to use Session::getSelectorsHandler() method to get selectors handler and change it (e.g. add new selectors to it).
In the 2-architecture-changes branch things have changed considerably and now we have (see https://github.com/Behat/Mink/blob/2-architecture-changes/src/Behat/Mink/Session.php#L46):
(DriverInterface + SelectorsHandler + Manipulator) = ElementFinder
(DriverInterface + ElementFinder) = Session
As you can see the SelectorsHandler is now created deep within ElementFinder and ElementFinder itself is created within Session.
If developer has full control over Session creation then of course he can create ElementFinder as he see fits and in the process obtain reference to SelectorsHandler.
However within Behat developer gets already created session via ->getSession() method that he can't change anymore.