I'm trying to use WordPress CodeCeption to run a script to install WordPress. I'm using PHPBrowser which is a headless browser.
Here is my script:
<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('Setup WordPress');
$I->amOnPage("/wp-admin/setup-config.php?step=1");
$I->see("Below you should enter your database connection details.");
$I->fillField('dbname', 'wordpress_unit_test');
$I->fillField('uname', 'wordpressuser');
$I->click('.button');
$I->click('.button');
$I->fillField('weblog_title', 'AWS Remote Dev Server');
$I->fillField('user_name', 'admin');
$I->fillField('#pass1-text', 'password');
$I->fillField('admin_email', 'admin@email.com');
$I->click('.button');
It's getting hung up on the password field in the WP install screen. Any idea how to fill this field? I've tried:
$I->fillField('pass1-text', 'password');
$I->fillField('#pass1-text', 'password');
But I keep getting:
Test tests/runner/SetupWordPressCept.php
Step Fill field "#pass1-text","password"
Fail Form field by Label or CSS element with '#pass1-text' was not found.
PHPBrowser does not support JavaScript, so if you want to check how this page looks for PHPBrowser, you should disable scripts in your browser (for example with NoScript).
In this case
pass1
is a ID andadmin_password
is a name: