codeceptjs
Advanced tools
Changelog
1.1.8
codeceptjs def
.-c
option.Changelog
1.1.7
/codecept
insde container/tests
codeceptjs
global runner added (symlink to /codecept/bin/codecept.js
)_locateCheckable (only available from other helpers)
_locateClickable (only available from other helpers)
_locateFields (only available from other helpers)
acceptPopup
cancelPopup
dragAndDrop
grabBrowserLogs
grabCssPropertyFrom
grabHTMLFrom
grabNumberOfVisibleElements
grabPageScrollPosition (new)
rightClick
scrollPageToBottom
scrollPageToTop
scrollTo
seeAttributesOnElements
seeCssPropertiesOnElements
seeInPopup
seeNumberOfVisibleElements
switchTo
waitForEnabled
waitForValue
waitInUrl
waitNumberOfVisibleElements
waitToHide
waitUntil
waitUrlEquals
grabPageScrollPosition
(new)seeNumberOfVisibleElements
waitToHide
grabPageScrollPosition
(new)grabPageScrollPosition
(new)sec
parameter.seeAttributesOnElements
and seeCssPropertiesOnElement
were incorrectly passing when the attributes/properties did not match by @reubenmillerconfig.test
/ Codecept.loadTests
by @sveneisenschmidtconfig.tests
for run-multiple
by @sveneisenschmidtChangelog
1.1.6
async I =>
functions syntax in Scenario by @APshenkinwaitForInvisible
waits for element to hide or to be removed from page. By @reubenmillergrabCurrentUrl
function. By @reubenmillergrabBrowserUrl
deprecated in favor of grabCurrentUrl
to unify the API.waitForEnabled
, waitForValue
and waitNumberOfVisibleElements
methods by @reubenmillergrabNumberOfVisibleElements
to return 0 when no visible elements are on page. By @michaltrunek_passed
hook runs after a test passed successfully_failed
hook runs on a failed testevent.all.before
- executed before all testsevent.all.after
- executed after all testsevent.multiple.before
- executed before all processes in run-multipleevent.multiple.after
- executed after all processes in run-multipleAfterSuite
and After
test hooks to be defined after the first Scenario. By @reubenmillerI.amOnpage
navigation if the browser is already at the given urlbootstrapAll
and teardownAll
hooks to be executed before and after all processescodeceptjs def
command accepts --config
option. By @reubenmillerChangelog
1.1.5
// retry action once on failure
I.retry().see('Hello');
// retry action 3 times on failure
I.retry(3).see('Hello');
// retry action 3 times waiting for 0.1 second before next try
I.retry({ retries: 3, minTimeout: 100 }).see('Hello');
// retry action 3 times waiting no more than 3 seconds for last retry
I.retry({ retries: 3, maxTimeout: 3000 }).see('Hello');
// retry 2 times if error with message 'Node not visible' happens
I.retry({
retries: 2,
when: err => err.message === 'Node not visible'
}).seeElement('#user');
Scenario().injectDependencies
added to dynamically add objects into DI container by @Apshenkin. See Dependency Injection section in PageObjects.within
waitUntilExists
deprecated in favor of waitForElement
waitForStalenessOf
deprecated in favor of waitForDetached
waitForDetached
addedI.seeNumberOfElements()
by @pmoncadaislagrabNumberOfTabs
function by @reubenmillerChangelog
1.1.4
yarn
call in package.jsonconsole.log
in Puppeteer by @othreerunOnAndroid
and runOnIOS
can receive a function to check capabilities dynamically:I.runOnAndroid(caps => caps.platformVersion >= 7, () => {
// run code only on Android 7+
});
Changelog
1.1.3
_locateCheckable
_locateClickable
_locateFields
closeOtherTabs
dragAndDrop
grabBrowserLogs
grabCssPropertyFrom
grabHTMLFrom
grabNumberOfVisibleElements
grabSource
rightClick
scrollPageToBottom
scrollPageToTop
scrollTo
seeAttributesOnElements
seeCssPropertiesOnElements
seeInField
seeNumberOfElements
seeNumberOfVisibleElements
seeTextEquals
seeTitleEquals
switchTo
waitForInvisible
waitInUrl
waitUrlEquals
closeCurrentTab
grabSource
openNewTab
seeNumberOfElements
seeTextEquals
seeTitleEquals
switchToNextTab
switchToPreviousTab
waitForInvisible
added by @reubenmillernightmare-har-plugin
by mingfang. Added enableHAR
option. Added HAR functions:
grabHAR
saveHAR
resetHAR
Changelog
1.1.2
grep
option to config to set default matching pattern for tests.acceptPopup
, cancelPopup
, seeInPopup
and grabPopupText
functions by @reubenmillerwithin
iframe and nested iframe support added by @reubenmillerresetRequestHeaders
method by @KalostrinhofollowRedirect
option and amFollowingRequestRedirects
/amNotFollowingRequestRedirects
methods by @KalostrinhouncheckOption
implemented by @brunobggrabBrowserUrl
by @Kalostrinho--profile
option to run-multiple
command by @jamie-beckChangelog
1.1.0
Major update to CodeceptJS. NodeJS v 8.9.1 is now minimal Node version required. This brings native async-await support to CodeceptJS. It is recommended to start using await for tests instead of generators:
async () => {
I.amOnPage('/page');
const url = await I.grabTextFrom('.nextPage');
I.amOnPage(url);
}
Thanks to @Apshenkin for implementation. Also, most helpers were refactored to use async-await. This made our code simpler. We hope that this encourages more users to send pull requests!
We also introduced strict ESLint policies for our codebase. Thanks to @Galkin for that.
angular: false
instead.within({frame: ['#wrapperId', '[name=content]']}, () => {
I.click('Sign in!');
I.see('Email Address');
});
I.see('Nested Iframe test');
I.dontSee('Email Address');
});
~
locator to find elements by aria-label
. This behavior is similar as it is in Appium and helps testing cross-platform React apps. Example:<Text accessibilityLabel="foobar">
CodeceptJS is awesome
</Text>
↑ This element can be located with ~foobar
in WebDriverIO and Appium helpers. Thanks to @flyskywhy
haveRequestHeaders
in sendPostRequest
. By @petrisorionelmultiple-run
by @trollrChangelog
1.0.3
waitUntilExists
implemented by @sabauoutput
dir by @APshenkin. Fix #571* Data table rows can be ignored by using xadd
. By @APhenkinData(table).only.Scenario
to give ability to launch only Data tests. By @APhenkinElementNotFound
error by @BorisOsipov.