Skip to content

Error codes W400-499

These errors originate from PageObjects, which are used by the drivers to interact with WordPress in a way that prevents code duplication and promotes re-use.

W400

Metabox “(…)” not found on the screen.

The browser cannot find the specified metabox on a content’s new/edit screens. Does the user’s role give visibility of the metabox? Is the metabox registered for the content type?

W401

Expected screen is the wp-admin dashboard, instead on “(…)”.

The browser is on an unexpected screen. Did something cause a redirect to another screen? Has the user authenticated?

W402

Expected screen header “(…)”, found “(…)”.

Header could not be found

The browser is on an unexpected screen, or the screen has unexpectedly changed. Did something cause a redirect to another screen? Has the user authenticated?

W403

Toolbar link “(…)” could not be found

The specified item could not be found in the WordPress Toolbar. Has the user authenticated? Does the user’s role give visibility of the toolbar item?

W404

Search field in the toolbar could not be found

The search field in the WordPress Toolbar could not be found. Has the user authenticated?

W405

Menu item could not be found

The specified item could not be found in the WordPress Admin Menu. Has the user authenticated? Does the user’s role give visibility of the toolbar item?

W406

To create pages you need to pass a factory with setPageObjectFactory()

To create elements you need to pass a factory with setPageObjectFactory()

To access the page factory you need to pass it first with setPageObjectFactory()

The most likely reason for these message is that you have used the bundled sensiolabs/behat-page-object-extension package in a custom Behat context, but have not set up setPageObjectFactory() before you’ve tried to use it. Refer to WordHat’s own codebase, or the sensiolabs/behat-page-object-extension package’s documentation.