Hello fellow miners, Ferret v0.9 has been released!
In this release, we mostly focused on bug fixes and filling gaps in user interaction functionality.
Let’s see what we’ve got.
What’s added
Clearing input values
Since early versions, Ferret has INPUT HTML function that allowed to type any value to input HTML element.
This works by appending the function parameter to any pre-existing <input> value. While it works fine in many cases, there are some scenarios when a target input field has a preset value which needs to be erased. With this release, Ferret has a new method INPUT_CLEAR that erases any data from a target input.
Double and more click
Single, double, or more. Now it’s possible to specify the number of clicks to CLICK function.
Unfocus
BLUR function removes focus from an active input field.
Default headers and cookies
With this release, you can set default headers and/or cookies to HTML drivers. One of the possible use cases is to create drivers with different custom names and pre-defined headers/cookies:
Params in dot notation
In previous versions of Ferret, it was possible to pass complex types as parameters, but it was impossible to read data from it using dot notation. Now it is possible. But even more - you can use params as dot notation segments:
String literals
In addition to defining string literals with quotes (’, “) and backtick (`), you can now define string literals with the forwardtick (´).
What’s fixed
Open tabs on error
Ferret didn’t close Chrome/Chromium tab if an error occurs during a page load.
CLICK
CLICK could not be used with both an element and selector.
Dot notation after a function call
Parser could not properly handle scenarios where dot notation was used right after a function call:
What’s changed
Internal cleanup and refactoring
We’ve made some internal cleanups and minor refactoring.
There might be minor breaking changes for those who use HTML drivers directly.
2nd returned value
The following methods have an error as asecond returned value now:
HTMLNode.GetChildNodesHTMLNode.GetChildNodeHTMLNode.QuerySelectorHTMLNode.QuerySelectorAllHTMLNode.CountBySelectorHTMLElement.GetValueHTMLElement.GetAttributesHTMLElement.GetAttribute
Re-arranged methods
The following methods have been moved from HTMLDocument to HTMLElement interface:
SelectBySelectorFocusBySelectorHoverBySelector
Removed methods
The following method(s) have been removed from HTMLDocument interface:
MoveMouseBySelector