Im currently making an acceptance test with the following tools:
- Codeception
- Selenium Webdriver
- PhantomJS (as headless browser ghost)
My problem is My Tests fail when visiting a self-signed (https) page
What I've tried:
phantomjs --webdriver=5555 --ignore-ssl-errors=true --ssl-protocol=any
- Adding this in capabilities
phantomjs.cli.args: ["--ignore-ssl-errors=true"]
in my acceptance.suit.yml
So far these options doesnt give me any luck.
Here is my acceptance.suit.yml
file
class_name: AcceptanceTester
modules:
enabled:
- WebDriver
config:
WebDriver:
url: https://myproject.com
browser: firefox
capabilities:
unexpectedAlertBehaviour: 'accept'
env:
phantom:
modules:
enabled:
- WebDriver
config:
WebDriver:
url: https://myproject.com
http_proxy: 192.1.1.1
http_proxy_port: 3000
browser: phantomjs
capabilities:
phantomjs.cli.args: ["--ignore-ssl-errors=true"]
UPDATE
This error shows up [ModuleException] WebDriver: Current url is blank, no page was opened
I don't know why this error happens since I've indicated a page. Here is a sample of my test
public function tryToTestThis(AcceptanceTester $I)
{
$I->wantTo('Test this function');
$I->amOnPage('/mypage/');
$I->see('This text');
}
An answer in Codeception would be preferable. Thanks