Codeception 2.0 RC: Strict Locators
Published on May 01, 2014
Codeception 2.0 is almost ready for final release. Thanks for everyone who already running alpha/beta version of Codeception and provides us with valuable feedback. If everything goes well the final release will be published in a week. The delay between releases is dictated by the need to allow parallel tests execution. As it was said before: Codeception won’t provide parallel test running out of the box, yet we will add a new chapter into guides where you will learn how to implement parallelism model that matches needs of your project.
In order to provide better element locations you can now specify locators explicitly like this:
['css' => 'input.name']. This will work for PHPBrowser, Frameworks modules, and WebDriver.
Allowed locator mechanisms are:
You can use strict locators in your Page Object classes as well.
See Element with Attributes
To improve checking element with expected attributes
seeElement now takes second parameter:
dontSeeElement works in corresponding manner.
grabAttributeFrom method added
To fetch value of attribute of element:
makeScreenshot method of WebDriver was simplified. Filename of saved screenshot does not include a test name.