Selenium 无效参数
Selenium invalid argument
我正在尝试设置代码接收。
当 运行 任何验收测试时,我得到以下错误:
> 1) FirstCest: Test
Test tests\acceptance\FirstCest.php:tryToTest
[Facebook\WebDriver\Exception\InvalidArgumentException] invalid argument
(Session info: chrome=81.0.4044.92)
Scenario Steps:
1. $I->amOnPage("/") at tests\acceptance\FirstCest.php:14
#1 C:\Users\USER\Desktop\Test\Programming test\vendor\php-webdriver\webdriver\lib\Exception\WebDriverException.php:99
#2 C:\Users\USER\Desktop\Test\Programming test\vendor\php-webdriver\webdriver\lib\Remote\HttpCommandExecutor.php:370
#3 C:\Users\USER\Desktop\Test\Programming test\vendor\php-webdriver\webdriver\lib\Remote\RemoteWebDriver.php:590
#4 C:\Users\USER\Desktop\Test\Programming test\vendor\php-webdriver\webdriver\lib\Remote\RemoteWebDriver.php:252
#5 Codeception\Module\WebDriver->amOnPage
#6 C:\Users\USER\Desktop\Test\Programming test\tests\_support\_generated\AcceptanceTesterActions.php:305
#7 C:\Users\USER\Desktop\Test\Programming test\tests\acceptance\FirstCest.php:14
#8 FirstCest->tryToTest
Artifacts:
Png: C:\Users\USER\Desktop\Test\Programming test\tests/_output\FirstCest.tryToTest.fail.png
Html: C:\Users\USER\Desktop\Test\Programming test\tests/_output\FirstCest.tryToTest.fail.html
ERRORS!
Tests: 1, Assertions: 0, Errors: 1.
PS C:\Users\USER\Desktop\Test\Programming test>
这是我的配置:
class_name: AcceptanceTester
colors: true
modules:
enabled:
- WebDriver
- Asserts
- \Helper\Acceptance
config:
WebDriver:
url: 'www.google.com'
browser: 'chrome'
window_size: 1280x1280
wait: 10
我是 运行 chrome 81.
然后我像这样启动我的 selenium-standalone 服务器
java -jar .\selenium-server-standalone-3.141.59.jar
我错过了什么论点?
谢谢。
WebDriver url 参数必须是有效的 URL 并且以方案开头 - http://
或 https://
.
我正在尝试设置代码接收。
当 运行 任何验收测试时,我得到以下错误:
> 1) FirstCest: Test
Test tests\acceptance\FirstCest.php:tryToTest
[Facebook\WebDriver\Exception\InvalidArgumentException] invalid argument
(Session info: chrome=81.0.4044.92)
Scenario Steps:
1. $I->amOnPage("/") at tests\acceptance\FirstCest.php:14
#1 C:\Users\USER\Desktop\Test\Programming test\vendor\php-webdriver\webdriver\lib\Exception\WebDriverException.php:99
#2 C:\Users\USER\Desktop\Test\Programming test\vendor\php-webdriver\webdriver\lib\Remote\HttpCommandExecutor.php:370
#3 C:\Users\USER\Desktop\Test\Programming test\vendor\php-webdriver\webdriver\lib\Remote\RemoteWebDriver.php:590
#4 C:\Users\USER\Desktop\Test\Programming test\vendor\php-webdriver\webdriver\lib\Remote\RemoteWebDriver.php:252
#5 Codeception\Module\WebDriver->amOnPage
#6 C:\Users\USER\Desktop\Test\Programming test\tests\_support\_generated\AcceptanceTesterActions.php:305
#7 C:\Users\USER\Desktop\Test\Programming test\tests\acceptance\FirstCest.php:14
#8 FirstCest->tryToTest
Artifacts:
Png: C:\Users\USER\Desktop\Test\Programming test\tests/_output\FirstCest.tryToTest.fail.png
Html: C:\Users\USER\Desktop\Test\Programming test\tests/_output\FirstCest.tryToTest.fail.html
ERRORS!
Tests: 1, Assertions: 0, Errors: 1.
PS C:\Users\USER\Desktop\Test\Programming test>
这是我的配置:
class_name: AcceptanceTester
colors: true
modules:
enabled:
- WebDriver
- Asserts
- \Helper\Acceptance
config:
WebDriver:
url: 'www.google.com'
browser: 'chrome'
window_size: 1280x1280
wait: 10
我是 运行 chrome 81.
然后我像这样启动我的 selenium-standalone 服务器
java -jar .\selenium-server-standalone-3.141.59.jar
我错过了什么论点?
谢谢。
WebDriver url 参数必须是有效的 URL 并且以方案开头 - http://
或 https://
.