Codeception / Webdriver:“SocketException:Connection Reset”

时间:2016-12-21 08:30:31

标签: php selenium-webdriver automated-tests codeception

遗憾的是,我遇到了代码问题。显示:http://puu.sh/sVvHW/b9309967a7.jpg

Chrome正在打开,但在网址字段中是“data:,”

有人能帮助我吗?

链接到我之前的问题:Codeception - " Curl error thrown for http POST to /session with params:"

Acceptance.suite config:

 class_name: AcceptanceTester 
 modules: 
 enabled:
 WebDriver
 \Helper\Acceptance
 Db: dsn: 'mysql:host=localhost;dbname=xxx' 
  user: 'root' 
  password: 'xxx' 
  dump: 'tests/_data/dump.sql' 
  populate:true 
 cleanup: false 
 reconnect: true config: 
 WebDriver: 
 url:'http://xxx.app/' 
browser: chrome  
host: 'localhost'
window_size: 'maximize'
env:  
phantom:  
modules: 
config:
     - WebDriver:  
browser: 'phantomjs'

这是我的考验:

<?php
  $I = new AcceptanceTester($scenario);
if (! $I->loadSessionSnapshot('login'))
{
$I->amOnPage('/backend/login');
$I->fillField('username', 'admin');
$I->fillField('password', 'admin');
$I->click('Sign me in');
// saving snapshot
$I->saveSessionSnapshot('login');
}
// Go to Item Types Page
$I->amOnPage('backend/inventory/types');
$I->canSee('Infrastructure');
$I->canSee('Device Component');
// Open Iteam Creation Form
 $I->click('Add');
$I->wait(3);
$I->fillField('itemtype[name]', 'Test New Type');
$I->fillField('itemtype[description]', 'Test Type Description');
$I->click('Submit');
$I->wait(3);
$I->see('Test New Type');
$I->see('Test Type Description');

0 个答案:

没有答案