Closed ArtuGit closed 7 years ago
I see the only working solution now is using of PhantomJS as a browser for Mink. How can I setup it?
I included phantomjs
to nodejs_npm_global_packages
.
What should I do further?
Why does it fail to connect to port 4444?
@ArtuGit - Are you running the behat
commands inside the VM or on the host? If so, it wouldn't be able to connect through to port 4444 since that's meant to only be accessed inside Drupal VM.
Also, can you share what you have set up in your behat.yml
.
@geerlingguy Of course, I am running it inside DVM.
My project behat.yml
:
default:
suites:
web_features:
paths: [ %paths.base%/features/web ]
contexts:
- WebContext
- Drupal\DrupalExtension\Context\DrupalContext
- Drupal\DrupalExtension\Context\MinkContext
- Drupal\DrupalExtension\Context\MessageContext
- Drupal\DrupalExtension\Context\DrushContext
extensions:
Behat\MinkExtension:
goutte: ~
javascript_session: selenium2
selenium2:
wd_host: http://test7.drupalvm.dev:4444/wd/hub
base_url: http://test7.drupalvm.dev
Drupal\DrupalExtension:
blackbox: ~
api_driver: 'drupal'
drupal:
drupal_root: '/var/www/drupalvm/test7/web'
region_map:
content: "#content"
@ArtuGit can you try ping test7.drupalvm.dev
inside the VM.
sometimes it's easier to use use http://localhost:4444/wd/hub
It works (inside DVM):
vagrant@drupalvm:/var/www/drupalvm/drupal/web$ ping test7.drupalvm.dev
PING test7.drupalvm.dev (192.168.88.88) 56(84) bytes of data.
64 bytes from drupalvm.dev (192.168.88.88): icmp_seq=1 ttl=64 time=0.018 ms
64 bytes from drupalvm.dev (192.168.88.88): icmp_seq=2 ttl=64 time=0.024 ms
64 bytes from drupalvm.dev (192.168.88.88): icmp_seq=3 ttl=64 time=0.025 ms
64 bytes from drupalvm.dev (192.168.88.88): icmp_seq=4 ttl=64 time=0.031 ms
64 bytes from drupalvm.dev (192.168.88.88): icmp_seq=5 ttl=64 time=0.026 ms
64 bytes from drupalvm.dev (192.168.88.88): icmp_seq=6 ttl=64 time=0.026 ms
64 bytes from drupalvm.dev (192.168.88.88): icmp_seq=7 ttl=64 time=0.027 ms
64 bytes from drupalvm.dev (192.168.88.88): icmp_seq=8 ttl=64 time=0.026 ms
vagrant@drupalvm:/var/www/drupalvm/drupal/web$ ping test7.drupalvm.dev:4444
ping: unknown host test7.drupalvm.dev:4444
@ArtuGit please post more information about your configuration, sounds like selenium isn't setup correctly.
See the issue template -- https://github.com/geerlingguy/drupal-vm/blob/master/.github/ISSUE_TEMPLATE
Also, if trying to use Chromedriver with Chrome, please see: https://github.com/geerlingguy/drupal-vm/issues/1152 :(
I think I might have the same issue here.
Vagrant 1.9.3
VirtualBox 5.1.18r114002
ansible 2.2.2.0
config file =
configured module search path = Default w/o overrides
config.yml - https://gist.github.com/attheshow/c8f8cb2a932c68e254557172d5d0b125 behat.yml - https://gist.github.com/attheshow/c375e715c50cc620915eaddd6d9e4e46 SolrSearch.feature - https://gist.github.com/attheshow/aaca463278bd9ea421aef1de245531c1 output of behat - https://gist.github.com/attheshow/22c49f01d10097b02cb3a2e027838b33
Unable to run a @javascript Behat test, unable to ping on port 4444 when logged into the VM. Already tried vagrant destroy && vagrant up without success.
I'm going to close this issue and push further discussion over to https://github.com/geerlingguy/drupal-vm/issues/1152
Now that Chrome has a headless mode, PhantomJS seems to be going the way of the dodo bird, and all the various webdrivers are in states of brokenness, I'm going to start pushing everyone towards using Google Chrome's headless mode first, and then hopefully also have a solution that uses FireFox.
PhantomJS seems to still work in most cases, but is more difficult to get set up, and also seems to be less efficient than Chrome.
See downstream implementation in Acquia's BLT project: https://github.com/acquia/blt/pull/1705
I would like to test things out standalone inside Drupal VM (with a default Drupal 8 website), and rework the documentation to support this use case.
It looks like the changes we need to make are:
dmore/behat-chrome-extension
9222
behat.yml
parameters:
browser_name: chrome
javascript_session: default
Read through the rest of the PR linked in the comment above for more specific changes.
@geerlingguy Could give the answer: Is this issue solved or not now?
I see a bunch of issues around this topic, but I do not see a specific solution
Read through the rest of the PR linked in the comment above for more specific changes.
What did you mean?
Do you have an example of specific configuration anywhere?
@ArtuGit This fixes the issue for me
Behat\MinkExtension:
browser_name: 'chrome'
goutte: ~
javascript_session: selenium2
base_url: http://local.premiumtom.com
files_path: /home/leo/repos/premium-tom/private
selenium2:
wd_host: http://localhost:4444/wd/hub
browser: chrome
capabilities: { "browser": "chrome", "version": "*", 'chrome': {'switches':['--start-maximized', "--headless", "--disable-gpu"]}}
adding --headless
for chrome
I have Drupal VM 4.4.5 with ubuntu1404. I made an upgrade from DVM 4.4.4 then I did
vagrant provision
a couple times. I used this manual to establish Behat - http://docs.drupalvm.com/en/latest/extras/selenium/ .When I run a behat scenario with
@javascript
I get following:I read some issues about such problem but I can not find a solution.
Regards, Artu