在尝试通过代码运行Selenium2测试时,我有很多警告。虽然测试工作。
如果有人能以正确的方式引导我纠正,则会发出警告:
C:\Users\Bebop\Documents\Site Internet\Sites\prestashop1.5.6\modules\paypal>php
codecept.phar run Selenium
Codeception PHP Testing Framework v1.7.0.2
Powered by PHPUnit 3.7.27 by Sebastian Bergmann.
PHP Warning: array_merge(): Argument #2 is not an array in phar://C:/Users/Bebo
p/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/src
/Codeception/Module/Selenium2.php on line 70
PHP Stack trace:
PHP 1. {main}() C:\Users\Bebop\Documents\Site Internet\Sites\prestashop1.5.6\m
odules\paypal\codecept.phar:0
PHP 2. require_once() C:\Users\Bebop\Documents\Site Internet\Sites\prestashop1
.5.6\modules\paypal\codecept.phar:7
PHP 3. Symfony\Component\Console\Application->run() phar://C:/Users/Bebop/Docu
ments/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/codecept:
29
PHP 4. Symfony\Component\Console\Application->doRun() phar://C:/Users/Bebop/Do
cuments/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/vendor/
symfony/console/Symfony/Component/Console/Application.php:121
PHP 5. Symfony\Component\Console\Application->doRunCommand() phar://C:/Users/B
ebop/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/
vendor/symfony/console/Symfony/Component/Console/Application.php:191
PHP 6. Symfony\Component\Console\Command\Command->run() phar://C:/Users/Bebop/
Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/vendo
r/symfony/console/Symfony/Component/Console/Application.php:897
PHP 7. Codeception\Command\Run->execute() phar://C:/Users/Bebop/Documents/Site
Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/vendor/symfony/cons
ole/Symfony/Component/Console/Command/Command.php:244
PHP 8. Codeception\Command\Run->runSuites() phar://C:/Users/Bebop/Documents/Si
te Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/src/Codeception/C
ommand/Run.php:83
PHP 9. Codeception\Codecept->runSuite() phar://C:/Users/Bebop/Documents/Site I
nternet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/src/Codeception/Comma
nd/Run.php:115
PHP 10. Codeception\SuiteManager->__construct() phar://C:/Users/Bebop/Documents
/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/src/Codeceptio
n/Codecept.php:124
PHP 11. Codeception\SuiteManager->initializeModules() phar://C:/Users/Bebop/Doc
uments/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/src/Code
ception/SuiteManager.php:48
PHP 12. Codeception\Module\Selenium2->_initialize() phar://C:/Users/Bebop/Docum
ents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/src/Codece
ption/SuiteManager.php:62
PHP 13. array_merge() phar://C:/Users/Bebop/Documents/Site Internet/Sites/prest
ashop1.5.6/modules/paypal/codecept.phar/src/Codeception/Module/Selenium2.php:70
Warning: array_merge(): Argument #2 is not an array in phar://C:/Users/Bebop/Doc
uments/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/src/Code
ception/Module/Selenium2.php on line 70
Call Stack:
0.0117 1074720 1. {main}() C:\Users\Bebop\Documents\Site Internet\Sites
\prestashop1.5.6\modules\paypal\codecept.phar:0
0.0208 1373568 2. require_once('phar://C:/Users/Bebop/Documents/Site In
ternet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/codecept') C:\Users\Be
bop\Documents\Site Internet\Sites\prestashop1.5.6\modules\paypal\codecept.phar:7
0.0667 4331624 3. Symfony\Component\Console\Application->run() phar://C
:/Users/Bebop/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codec
ept.phar/codecept:29
0.0785 4941624 4. Symfony\Component\Console\Application->doRun() phar:/
/C:/Users/Bebop/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/cod
ecept.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:121
0.0791 4941624 5. Symfony\Component\Console\Application->doRunCommand()
phar://C:/Users/Bebop/Documents/Site Internet/Sites/prestashop1.5.6/modules/pay
pal/codecept.phar/vendor/symfony/console/Symfony/Component/Console/Application.p
hp:191
0.0792 4941624 6. Symfony\Component\Console\Command\Command->run() phar
://C:/Users/Bebop/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/c
odecept.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:89
7
0.0802 4941992 7. Codeception\Command\Run->execute() phar://C:/Users/Be
bop/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/v
endor/symfony/console/Symfony/Component/Console/Command/Command.php:244
0.1596 9010384 8. Codeception\Command\Run->runSuites() phar://C:/Users/
Bebop/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar
/src/Codeception/Command/Run.php:83
0.1597 9010720 9. Codeception\Codecept->runSuite() phar://C:/Users/Bebo
p/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/src
/Codeception/Command/Run.php:115
0.1675 9175200 10. Codeception\SuiteManager->__construct() phar://C:/Use
rs/Bebop/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.p
har/src/Codeception/Codecept.php:124
0.1756 10263064 11. Codeception\SuiteManager->initializeModules() phar://
C:/Users/Bebop/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/code
cept.phar/src/Codeception/SuiteManager.php:48
0.1867 11096264 12. Codeception\Module\Selenium2->_initialize() phar://C:
/Users/Bebop/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codece
pt.phar/src/Codeception/SuiteManager.php:62
0.1914 11529024 13. array_merge() phar://C:/Users/Bebop/Documents/Site In
ternet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/src/Codeception/Module
/Selenium2.php:70
=============此时测试开始
←[1mSelenium Tests (1) ←[0m-----------------------------------------------------
--------------
Trying to ←[35;1mlogin in backoffice←[0m (PrestaShopModuleListCest.install_the_m
odule) Ok
--------------------------------------------------------------------------------
-------
Time: 27.79 seconds, Memory: 16.25Mb
←[30;42m←[2KOK (1 test, 0 assertions)
←[0m←[2K
答案 0 :(得分:0)
好的,发现了什么问题:
我的Selenium.suite.yml中有一个丢失的空间,它没有在数组中转换我的能力:
capabilities:
unexpectedAlertBehaviour: 'accept'
这是件好事