These are chat archives for Behat/Behat

7th
May 2017
Christian Sciberras
@uuf6429
May 07 2017 20:25
Hi all! Since some time, I've been writing a Mink driver for Electron (aka atom shell).
Ciaran McNulty
@ciaranmcnulty
May 07 2017 20:26
sounds interesting!
similar to cucumber-electron?
Christian Sciberras
@uuf6429
May 07 2017 20:27
Erm, more like a replacement of PhantomJS with Electron.
Anyway, I was wondering about something, should I bundle the Behat DriverExtension and DriverFactory within my driver package, or push it into Behat source?
@ciaranmcnulty if you'd like to give it a look: https://github.com/uuf6429/MinkElectronDriver
Ciaran McNulty
@ciaranmcnulty
May 07 2017 20:28
More documentation coming soon... sounds good :-)
Christian Sciberras
@uuf6429
May 07 2017 20:28
Not much in terms of documentation yet. Basically, it requires nodejs and php 5.5.
Ciaran McNulty
@ciaranmcnulty
May 07 2017 20:28
Most drivers and extensions live in their own projects
Christian Sciberras
@uuf6429
May 07 2017 20:29
Eh, I thought so. I started having doubts after seeing stuff like Appium and Goutte in Behat.
Ciaran McNulty
@ciaranmcnulty
May 07 2017 20:30
MinkExtension does have some...
especially when it's just a different config of the existing drivers
A PR is probably a good place to discuss
The drivers are all separate, however
Christian Sciberras
@uuf6429
May 07 2017 20:30
Oh, apologies... I meant MinkExtension not behat.
Ciaran McNulty
@ciaranmcnulty
May 07 2017 20:30
yeah
Christian Sciberras
@uuf6429
May 07 2017 20:32
While on the subject, I have a few questions about behat configuration.
What I don't see (or isn't clear to me) is, what controls which driver should be used?
Ciaran McNulty
@ciaranmcnulty
May 07 2017 20:33
How do you mean
You're specifying symfony2 as the driver (or do I misunderstand?)
Christian Sciberras
@uuf6429
May 07 2017 20:34
(I should close a few browser tabs) :D
Ciaran McNulty
@ciaranmcnulty
May 07 2017 20:35
I don't remember how 2.5 works sorry
but there's nothing about drivers there?
Christian Sciberras
@uuf6429
May 07 2017 20:36
hmm, I have a better example
Ciaran McNulty
@ciaranmcnulty
May 07 2017 20:36
which section do you mean
Christian Sciberras
@uuf6429
May 07 2017 20:39
This is something from where I work. Unfortunately, the guy that wrote this stuff left so I can't ask.
As I understand, we're using selenium driver, but I don't understand the configuration structure.
Ciaran McNulty
@ciaranmcnulty
May 07 2017 20:40
ah ok
mink has 2 drivers
the default driver, and the javascript driver
default session is the first non-JS session, or if there aren't any it's the first JS session
default JS session is the first JS session, or if there aren't any it's null
so in your case the default session is selenium2, the default JS session is selenium2
(this can be overridden via extra config keys)
Christian Sciberras
@uuf6429
May 07 2017 20:42
Well, one thing I don't understand is why the driver name is the key, not a value.
I'd expect something like driver: selenium
Ciaran McNulty
@ciaranmcnulty
May 07 2017 20:43
yeah I can't remember :0
Christian Sciberras
@uuf6429
May 07 2017 20:44
so, ok, when I finish with my extension and driver factory, I suppose that whatever driver key I choose would go there.
Ciaran McNulty
@ciaranmcnulty
May 07 2017 20:45
yep, whatever the driverfactory declares
Christian Sciberras
@uuf6429
May 07 2017 20:45
selenium: ~ means it's with default config, right? so I can configure selenium by removing the tilde and adding entries below?
because none are required, the defaults apply
Christian Sciberras
@uuf6429
May 07 2017 20:49
ok, cool. One last question, if you don't mind.
Do you know of some good documentation for ArrayNodeDefinition? From what I can tell, it's a symfony component.
Christian Sciberras
@uuf6429
May 07 2017 20:51
Aha, should have known. :D
ok, thanks a lot!
Ciaran McNulty
@ciaranmcnulty
May 07 2017 20:52
no problem, good luck!