zombie v2.0.0 Release Notes
Release Date: 2014-09-24 // over 9 years ago-
📚 Much much has changed, and the documentation has not caught up. Here's a partial and incomplete list.
🏁
browser.tabs
replacesbrowser.windows
. Is now an array so you can access a 💻 tab directly (e.g.browser.tabs[0]
), and also switch tabs more easily (e.g. 💻browser.tabs.current = 0
).🌲
console.log
,console.error
and friends now emit aconsole
event from the 💻 browser. First argument is the output type (e.g. "log"), second is the formatted text.console.error
andconsole.assert
output to standard error (unless silent).💻
browser.url
returns the URL of the current document.🆕 New browser has no open window. You need to call
visit
,open
or setlocation
.💻 Brand new implementation of browser history, fixes the "two URLs, one window" issue.
💻
browser.request
andbrowser.response
return the request/response used for the last top-most page load. All other resources available from 💻browser.resources
. These replacelastRequest
andlastResponse
.➕ Added
browser.activeElement
(removedbrowser.focus
) and support forautofocus
attribute.💻 Browser is now an
EventEmitter
so you can hook into it and instrument it.The
wait
method now takes two optional parameters: options that determine how long to wait and a callback. Options includeduration
,function
andelement
, the later completing when the element is found in the document.The
wait
method's wait function now receives two parameters: the active window and how long the wait is for the next event (0 to Infinity).The
visit
method now passes applicable options towait
(duration
,function
, etc).The
maxWait
option is now calledwaitDuration
andwaitFor
is no longer 👌 supported. waitDuration should be provided in milliseconds (maxWait was provided in seconds)Introducing assertsions to make your life all the more easier, for example:
browser.element("h1") browser.text("h1", "Header") browser.elements("li", { atLeast: 5 }) browser.assert.url("http://example.com")
➕ Added support for deflat and gzip responses.
🆕 New API for accessing resources, use
browser.resources
. Lots of goodies like 👍 allowing you to retrieve resources directory (resources.get
,resources.post
), define how resources are handled, emulate server failures 🤡 (resources.fail
), delay responses (resources.delay
), even mock responses 🤡 (resources.mock
).676 tests 12 sec to complete