Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

Improper use of Driver #55

Closed
eduard-sukharev opened this issue Jan 14, 2014 · 2 comments
Closed

Improper use of Driver #55

eduard-sukharev opened this issue Jan 14, 2014 · 2 comments

Comments

@eduard-sukharev
Copy link

I've encountered a problem that rises when Behatch is used with drivers other than Goutte.
Namely, when in e.g. RestContext there's a call:

$this->getSession()->getDriver()->getClient()
the problem here is that getDriver() returns an instance of a DriverInterface. But DriverInterface does not specify getClient() method. Actually, getClient() method is defined in BrowserKitDriver. Thus, Behatch doesn't mind working with Selenium2, Zombie etc., but it actually can't properly work with them, as they only extend CoreDriver, while it works ok with Goutte (which is instance of BrowserKit).

I guess you should either define that you expect $this->getSession()->getDriver() returns instance of BrowserKit, or add support for true DriverInterface.

@PavelZamriy
Copy link

👍

@sanpii
Copy link
Member

sanpii commented Apr 21, 2015

See #119 (comment)

@sanpii sanpii closed this as completed Jun 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants