Skip to content

0.2.0

Choose a tag to compare

@itnelo itnelo released this 18 Dec 18:58
· 14 commits to master since this release
0.2.0
06b6f31

Added

  • ClientInterface::getTabIdentifiers() method implementation (reading a list of tabs, which are opened in the browser).
  • Implementations for the ClientInterface::getActiveTabIdentifier() and ClientInterface::setActiveTab() commands, to determine which of the tabs is currently "focused" and to open (focus) a specific one.
  • ClientInterface::openUri() and ClientInterface::getCurrentUri() implementations, to open a web page in the current browser tab and read an URI from the address bar.
  • ClientInterface::getSource() for acquiring source code of the web resource that is opened in the active (focused) browser tab (view-source action).
  • ClientInterface::getElementIdentifier() to get an internal WebDriver handle of the specific element on the page.
  • ClientInterface::getActiveElementIdentifier() to get an internal handle of the currently focused element.
  • ClientInterface::getElementVisibility() to check if the target is visible on the page.
  • ClientInterface::mouseMove() and ClientInterface::mouseLeftClick() to perform the most common mouse actions in the browser window.
  • ClientInterface::keypressElement() to send keyboard keys to the element on the page.
  • ClientInterface::getScreenshot() and a WebDriverInterface::saveScreenshot() shortcut implementation, to capture a screen state of the remote browser instance.
  • WebDriverInterface::wait() and WebDriverInterface::waitUntil() to make delays and conditional checks (waiting for element visibility, etc.).
  • README: a "Requirements" block, description improvements.

Changed

  • Timeout\Interceptor is now raising a single exception with both method-specific message and a timeout context.

Fixed

  • Interface fixes and a minor redesign for some signatures.

This version brings an async variant for most methods (no tests yet), which were defined by the WebDriverInterface and ClientInterface, to communicate with a remote Selenium WebDriver service in non-blocking mode, except: getSessionIdentifiers, removeSession and clickElement commands (the last one can be supplanted by the mouseLeftClick, in combination with the mouseMove action).

At this moment, ClientInterface::createSession() is able to send only a hardcoded set of capabilities (settings for the executable file and profile preferences) to launch a browser instance (will be patched in the later versions):

{
    "browserName": "chrome",
    "goog:chromeOptions": {
        "args": [
            "--user-data-dir=\u002fopt\u002fgoogle\u002fchrome\u002fprofiles"
        ],
        "prefs": {
            "intl.accept_languages": "RU-ru,ru,en-US,en"
        }
    }
}