Dropped Node.js 12 support.
The lib probably should still work with it, but you'd better check first.
Improved cookie setting process. Now cookies are set prior to opening a new page. Which means that request for that page now includes cookies that have been set.
Added an ability to automatically clear cookies during a new page creation.
Updated puppeteer
to ^13.3.2 to fix CVE-2022-0235.
If you depend on the Puppeteer's API then you should check this release notes for breaking changes: v11.0.0, v12.0.0, v13.0.0.
Also removed default values for first params of commands expectSelector
and expectVisibilityState
.
Now the values should be passed explicitly.
Support passing options to Puppeteer's goto
in open
command.
We've improved debug logging a bit.
Earlier when user run Phantom Lord with DEBUG=1
and there were logged objects in DevTools,
the objects were printed in debug logs like this:
filename.js verbose: CONSOLE: [object Object]
Now every logged object or array, or anything is readable:
filename.js verbose: CONSOLE: 1
filename.js verbose: CONSOLE: string
filename.js verbose: CONSOLE: null
filename.js verbose: CONSOLE: undefined
filename.js verbose: CONSOLE: [1,2,3]
filename.js verbose: CONSOLE: {"a":1}
filename.js verbose: CONSOLE: Symbol(symbol)
filename.js verbose: CONSOLE: () => {}
filename.js verbose: CONSOLE: function fn() {}
Now performMouseAction
scrolls to the passed element when it's not in the viewport.
This is a breaking change and it may affect all the current tests due to the side effects that are caused by the scroll.
Now performMouseAction
checks for overlapping node.
Existing tests might be broken due to the fact, that now this method and its derivatives throw an error instead of making an action. But they were already broken earlier, so this version actually fixes the behaviour.
Updated puppeteer
to ^10.1.0.
If you depend on the Puppeteer's API then you should check this release notes for breaking changes: v6.0.0, v7.0.0, v8.0.0, v9.0.0, v10.0.0.
- Fixed security vulnerabilities.
- Added support for xPath selector in
clear
command.
- Improved regexp params logging.
- Updated
puppeteer
to ^5.0.0.
If you depend on the Puppeteer's API then you should check this release notes for breaking changes: v2.0.0, v3.0.0, v4.0.0, v5.0.0.
- Added
setRequestInterceptor
. - Reverted "Fix setting test data while navigating to a new page" from 9.3.0, which probably has led to breaking backward compatibility.
- Added LICENSE.
- Prepared the package for publishing on GitHub.
- Used
puppeteer@^1.18.1
instead of[email protected]
. - Updated the deps.
- Removed useless param of
waitForSelectorValue
.
- Fixed creating screenshots on Windows.
- Fixed setting test data while navigating to a new page.
- Prevented overriding elements' content.
- Improved moving cursor to the end of input before pressing Backspace.
- Added moving cursor to the end of the input before pressing Backspace.
- Removed useless deps.
- Updated Mocha to 6.2.1.
- Fixed reporting error of non found element.
- Fixed clearing input value with large amount of symbols.
- Added waiting for element in commands
click
&clickSelectorText
.
- Updated Puppeteer to 1.18.1.
- Returned
textContent
instead ofinnerText
infetchTextFromElement
.
- Fixed browser errors handling.
- Added installation info to README.
- Returned
innerText
instead oftextContent
infetchTextFromElement
.
- Added
waitForEventListener
cmd.
- Added argument
--allow-insecure-localhost
to Puppeteer launch cmd.
- Replaced nbsp with normal space in
waitForText
command.
- Add preventing proxing own prototype methods through
checkCommand
.
- Replaced
clear
cmd withclearTextField
.
- Added
clearTextField
command.
- Added type declaration file.
- Fixed firing
performMouseAction
for hover.
- Added support for browser tabs.
- Added
sendKeys
docs to README.
- Added setting cursor position in
sendKeys
cmd.
- Separated browser firing from page opening.
- Added output msg of browser's console when error occurs in
console
event.
- Replaced emitting
browserErrors
event to throwing error.
- Improved README.
- Fixed behavoir of
waitWhileVisible
andwaitUntilVisible
.
- Fix 'Unhandled promise rejection' before closing the browser.
- Move from stepped evaluation model derived from Casper to proper async-await.
- Colorized debug logs.
- Added output stack trace for console errors.
- Fixed app project root path calculation.
- Fixed path to Phantom Lord while running the project.
- Moved the package into the @funboxteam scope.
- Removed
checkCmd
call inclear
command. - Fixed error that occurred when one was getting element's text.
- Split index.js on separated modules and renamed some of them.
- Added correct stack trace generation in cmds w/o delays.
- Added
clickSelectorText
method.
- Fixed
E2E_TEST_WITH_PAUSES
behavior.
- Fixed click and hover on elements by coords.
- Moved from PhantomJS to Puppeteer.
- Added
clear
method for inputs.
- Fixed regexp support in mocks.
- Added ESLint.
- Added Windows support.
- Added
addLocalStorageItemToQueue
.
- Made path to
localStorage
unique.
- Added
addCookieToQueue
.
- Added note about
devtool
param to README.
- Renamed the package to
funbox-phantom-lord
.
- Improved the docs.
- Renamed
window.mocks
towindow.stubs
.
- Fixed waitUntilVisible.
- Added clickViaOther method.
- Improved stack trace logging when timeout fail occurs.
- Changed used ports range to prevent conflicts on CI.
- Increased used ports range.
- Improved PhantomJS not-started state handling.
- Added logging PhantomJS response parsing error.
- Added logging PhantomJS port.
- Added logging original cmd when parsing error occurs.
- Added
browserErrors
event to handle JS errors of test pages.
- Improved timeouts and errors generation.
- Added setting
state = exiting
whenexit
fn is fired.
- Limited printing Phantom.JS logs. Now they're shown only when env variable is passed.
- Added exit event emitting for PhantomJS finishing.
- Move PhantomJS error into the separated event.
Now
error
is an ordinary error which should fail the test, whilephantomError
is something horrible that is not related to the test itself. - Added debug info.
- Removed
then()
wrapping for capturing methods.
- Moved mocks logic into the browser.
- Fixed waitForSelectorText & waitForSelectorValue.
- Fixed tests filtering.
- Add waiting for server process finish.
- Added printing errors for functions frozen on timeout.
- Initial version.