You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The DriverInterface currently has method getCookie($name) {}, but it lacks getCookies(). This would be helpful in cases where the name of the cookie needed is not known.
I understand this would be a BC break, so I think it would have to be in version 2.0.0. I believe most drivers support such a method of cookie retrieval. Goutte/Chrome certainly do.
My use case:
I'm trying to write a behat test for a Drupal 8 site and in one of my step definitions, I need to make a separate request via Guzzle to the Drupal site using the same session that exists within the driver. Specifically, I'm writing a test that downloads a file from the site to verify that it could do that successfully. It doesn't seem possible to do that properly by using the driver directly, so I'm trying to use Guzzle to download the file. I need to copy the session cookies from the driver to the Guzzle request. The problem is that Drupal uses a special hash as the name of the cookie. I can reproduce the calculation to create the hash, but it makes my tests a bit brittle.
The text was updated successfully, but these errors were encountered:
The
DriverInterface
currently has methodgetCookie($name) {}
, but it lacksgetCookies()
. This would be helpful in cases where the name of the cookie needed is not known.I understand this would be a BC break, so I think it would have to be in version 2.0.0. I believe most drivers support such a method of cookie retrieval. Goutte/Chrome certainly do.
My use case:
I'm trying to write a behat test for a Drupal 8 site and in one of my step definitions, I need to make a separate request via Guzzle to the Drupal site using the same session that exists within the driver. Specifically, I'm writing a test that downloads a file from the site to verify that it could do that successfully. It doesn't seem possible to do that properly by using the driver directly, so I'm trying to use Guzzle to download the file. I need to copy the session cookies from the driver to the Guzzle request. The problem is that Drupal uses a special hash as the name of the cookie. I can reproduce the calculation to create the hash, but it makes my tests a bit brittle.
The text was updated successfully, but these errors were encountered: