When I try to launch
php behat.phar
The WebDriver firefox window pops up and then my feature test fails at first step and skips the rest. I get:
...
Given I am on "first.php" #FeatureContext::visit()
Session [url] not available and is not among the last 1000 terminated sessions.
Active sessions are[ext. key 51191ae0-8f6f-49d0-27b322967296]
...
If I only use behat the test passes. This happens only when I try to use selenium.
I'm using MinkExtension GivenIAmOn() premade function
my behat.yml:
default:
paths:
features: features
bootstrap: features/bootstrap
extensions:
mink_extension.phar:
mink_loader: 'mink.phar'
base_url: 'http://10.0.0.10/'
goutte: ~
selenium2:
wd_host: 'http://localhost:4444/wd/hub'
capabilities:
version: ''
My FeatureContext extends from MinkContext.
I've been searching for a solution for days and I couldn't solve this.
I'm working with Windows 7 with firefox 26, selenium-server-standalone-2.42.2 and I tried lower versions as well. As I read in some issues, the session/"session-id"/url was broken some versions ago, but now it shouldn't. For some reason it can't pick the right session.
Sorry for the data quality, I don't have an internet connection at my workplace and it's quite restricted. That's why I use .phar files instead of using composer. I can't either copy-paste the files and so on. If I have to provide more data just tell me and I will.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…