New to codeception - Can anyone let me know how to run codeception in safari and opera browsers from Windows 8.1 #3856

rajabhaskar opened this Issue Dec 21, 2016 · 3 comments


None yet

2 participants

rajabhaskar commented Dec 21, 2016 edited

Can you please let me know how I can run acceptance suite in safari browser in Windows 8.1. Below is my acceptance.yml file configuration. I tried --env safari and --env firefox by mentioning the env in acceptance suite. yml also but no luck. it's giving me error

Curl error thrown for http POST to /session with params: {"desiredCapabilit
Could not resolve host: selenium-hub

Please make sure that Selenium Server or PhantomJS is running.

But I do have selenium jar or phantom running aside already with below command
phantomjs --webdriver=4444 [OR] java -jar vendor/selenium/selenium-server/selenium-server-standalone-2.53.0.jar


url: ''
browser: safari
wait: 2
window_size: maximize
clear_cookies: false
unexpectedAlertBehaviour: 'accept'
handlesAlerts: true
but it is not working. If I replace the browser name with Chrome (and run executable) or firefox then I was able to run my suite. Please advise. (By the way, I do have safari installed manually in my machine - V5.1.7)

  • Codeception version: 2.2.1
  • PHP Version:7.0.7
  • Operating System: Windows 8.1
  • Installation type: Phar || Composer
  • List of installed packages (composer show)
    behat/gherkin v4.4.5 Gherkin DSL parser for PHP 5.3
    codeception/codeception 2.2.0 BDD-style testing framework
    codeception/specify 0.4.5 BDD code blocks for PHPUnit and...
    codeception/verify 0.3.2 BDD assertion library for PHPUnit
    doctrine/instantiator 1.0.5 A small, lightweight utility to...
    facebook/webdriver 1.2.0 A PHP client for WebDriver
    flow/jsonpath 0.3.4 JSONPath implementation for par...
    guzzlehttp/guzzle 6.2.2 Guzzle is a PHP HTTP client lib...
    guzzlehttp/promises v1.3.1 Guzzle promises library
    guzzlehttp/psr7 1.3.1 PSR-7 message implementation
    justinrainbow/json-schema 4.0.1 A library to validate a json sc...
    monolog/monolog 1.22.0 Sends your logs to files, socke...
    myclabs/deep-copy 1.5.5 Create deep copies (clones) of ...
    pdepend/pdepend 2.3.2 Official version of pdepend to ...
    phpdocumentor/reflection-common 1.0 Common reflection classes used ...
    phpdocumentor/reflection-docblock 3.1.1 With this component, a library ...
    phpdocumentor/type-resolver 0.2.1
    phpmd/phpmd 2.5.0 PHPMD is a spin-off project of ...
    phpoffice/phpexcel 1.8.1 PHPExcel - OpenXML - Read, Crea...
    phpspec/prophecy v1.6.2 Highly opinionated mocking fram...
    phpunit/php-code-coverage 4.0.4 Library that provides collectio...
    phpunit/php-file-iterator 1.4.2 FilterIterator implementation t...
    phpunit/php-text-template 1.2.1 Simple template engine.
    phpunit/php-timer 1.0.8 Utility class for timing
    phpunit/php-token-stream 1.4.9 Wrapper around PHP's tokenizer ...
    phpunit/phpunit 5.7.4 The PHP Unit Testing framework.
    phpunit/phpunit-mock-objects 3.4.3 Mock Object library for PHPUnit
    psr/http-message 1.0.1 Common interface for HTTP messages
    psr/log 1.0.2 Common interface for logging li...
    sebastian/code-unit-reverse-lookup 1.0.0 Looks up which function or meth...
    sebastian/comparator 1.2.2 Provides the functionality to c...
    sebastian/diff 1.4.1 Diff implementation
    sebastian/environment 2.0.0 Provides functionality to handl...
    sebastian/exporter 2.0.0 Provides the functionality to e...
    sebastian/global-state 1.1.1 Snapshotting of global state
    sebastian/object-enumerator 2.0.0 Traverses array structures and ...
    sebastian/recursion-context 2.0.0 Provides functionality to recur...
    sebastian/resource-operations 1.0.0 Provides a list of PHP built-in...
    sebastian/version 2.0.1 Library that helps with managin...
    selenium/chromedriver/linux64 2.21
    selenium/chromedriver/mac32 2.21
    selenium/chromedriver/win32 2.21
    selenium/edgedriver 3.14393
    selenium/opera 0.2.2
    selenium/safari 2.48
    selenium/selenium-server 2.53.0
    squizlabs/php_codesniffer 2.7.1 PHP_CodeSniffer tokenizes PHP, ...
    symfony/browser-kit v3.2.1 Symfony BrowserKit Component
    symfony/config v3.2.1 Symfony Config Component
    symfony/console v3.2.1 Symfony Console Component
    symfony/css-selector v3.2.1 Symfony CssSelector Component
    symfony/debug v3.2.1 Symfony Debug Component
    symfony/dependency-injection v3.2.1 Symfony DependencyInjection Com...
    symfony/dom-crawler v3.2.1 Symfony DomCrawler Component
    symfony/event-dispatcher v3.2.1 Symfony EventDispatcher Component
    symfony/filesystem v3.2.1 Symfony Filesystem Component
    symfony/finder v3.2.1 Symfony Finder Component
    symfony/http-foundation v3.2.1 Symfony HttpFoundation Component
    symfony/http-kernel v3.2.1 Symfony HttpKernel Component
    symfony/polyfill-mbstring v1.3.0 Symfony polyfill for the Mbstri...
    symfony/process v3.2.1 Symfony Process Component
    symfony/yaml v3.2.1 Symfony Yaml Component
    webmozart/assert 1.2.0 Assertions to validate method i...
# paste suite config here
edno commented Dec 21, 2016 edited

For community support, I recommend you to use PHPTestClub

edno commented Dec 21, 2016

Why are you trying to test Safari in Windows since it is not supported since 2012?

Which version of Safari are you running?

rajabhaskar commented Dec 21, 2016 edited

@edno Thanks for the reply ... I am trying to run codeception acceptance suite in all browsers or at least Chrome, firefox, PhantomJs, opera and Safari. I have safari 5.1.7 installed in my local. Also I do have the same issue for Opera browser.

It's working fine if I use plain Java program (Just tried with simple program) using driver=new SafariDriver(). But failed to use with codeception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment