Skip to content

Releases: seleniumQuery/seleniumQuery

0.20.0

Choose a tag to compare

@acdcjunior acdcjunior released this 02 Jan 15:54

Dependencies versions updates only.

0.19.0

Choose a tag to compare

@acdcjunior acdcjunior released this 03 May 01:23
  • Updated versions of Selenium (3.11.0) and other libs.

  • Added support for EventFiringWebDriver

    • Example:
    $.driver().useHtmlUnit().withWebDriverEventListener(new AbstractWebDriverEventListener() {
        @Override
        public void beforeNavigateTo(String url, WebDriver driver) {
            openedUrl.set(url);
        }
    });

0.18.0

Choose a tag to compare

@acdcjunior acdcjunior released this 16 Dec 23:57

Highlights

Automatic (.exe) driver download! Automatic driver quit! Headless for Chrome and Firefox:

$.driver()
    .useChrome()
    .headless() // configures chrome to be headless
    .autoDriverDownload() // automatically downloads and configures chromedriver.exe
    .autoQuitDriver(); // automatically quits the driver when the JVM shuts down

Assertions: Created $().assertThat(). Any function that is available for .waitUntil() is also available for asserting:

$("#resultStats").assertThat().text().containsIgnoreCase("seconds");

Improved waiting: Dramatically improved $().waitUntil() inner-workings and error messages:

$("#foo").waitUntil().size().isGreaterThan(5);

// When failing, it will now show:
//
// Timeout while waiting for $("#foo").waitUntil().size().isGreaterThan(5).
// 
// expected: <size() to be greater than 5>
// but: <last size() was 2>

And much more. See below.


Whats new?

  • Added functions:

    • $().refresh() - refreshes (requeries) the object, minimizingStaleElementException issues
    • $.title() - returns page title
    • $.eval(<javascript code>) - evaluates general JavaScript code
    • $().eval(<javascript code>) - evaluates general JavaScript code receiving current elements as argument
    • $().stream() - return a Java 8 Stream
    • $().map(<function>) - runs the function on every matched element
  • Driver builder:

    • Added automatic driver download (backed by webdrivermanager)
      • $.driver().useChrome().autoDriverDownload();
      • $.driver().useFirefox().autoDriverDownload();
      • $.driver().usePhantomJS().autoDriverDownload();
      • $.driver().useInternetExplorer().autoDriverDownload();
    • Added Edge and Opera drivers support:
      • $.driver().useEdge().autoDriverDownload();
      • $.driver().useOpera().autoDriverDownload();
    • Added headless from Chrome and Firefox:
      • $.driver().useChrome().headless();
      • $.driver().useFirefox().headless();
  • Added auto-quit for every driver. Full examples:

    • $.driver().useChrome().headless().autoDriverDownload().autoDriverQuit();
    • $.driver().useFirefox().headless().autoDriverDownload().autoDriverQuit();
  • Wait system

    • dramatically improved wait system:
    • allowing greater chaining of expression
    • WAY more clear error messages
  • Assertion functions

    • Added $("#myDiv").assertThat().text().contains("abc");
  • .waitUntil() and .assertThat()

    • Added .matches(<Hamcrest Matcher>):
      • $("#myDiv").waitUntil().text().matches(Matchers.containsString("John"))
    • .matches(Pattern)
    • .matches(lambda predicate)
      • $("#ipt").waitUntil().val().matches(value -> value.length() > 50)
    • .isEmpty()
    • .isNotEmpty()
    • .isPresent()
    • .isVisible()
    • .isDisplayed()
    • .isHidden()
    • .isNotVisible()

Dependencies:

  • Updated Selenium to 3.8.1 and more...

Many more, check 0.18.0 milestone:
https://github.com/seleniumQuery/seleniumQuery/milestone/15?closed=1

Go get it:

<dependency>
    <groupId>io.github.seleniumquery</groupId>
    <artifactId>seleniumquery</artifactId>
    <version>0.18.0</version>
</dependency>

0.17.0

Choose a tag to compare

@acdcjunior acdcjunior released this 03 Dec 16:55

Noteworthy:

  • Updated to Selenium 3.8.0 (jdk8)

  • Updated htmlunit-driver to 2.27

  • Added Chrome headless mode:

    $.driver().useChrome().withHeadlessMode();
    

Other changes

  • Created SeleniumQuery.seleniumQueryBrowser() to get the SeleniumQueryBrowser instance used by the global SeleniumQuery.$ field.
  • Update some dependencies, such as commons-lang3 from 3.5 to 3.6, as well as added commons-text 1.1.
  • Removed htmlunit's $.driver().useHtmlUnit().emulatingInternetExplorer8(), $.driver().useHtmlUnit().emulatingInternetExplorer11() and other browsers HtmlUnit does not emulate anymore.
  • Removed $.browser.function()s
    • The new place for the functions that were in $.browser.FUNCTION is either $.FUNCTION or $.driver().FUNCTION.
    • In other words, the function $.browser.function() will either be $.function() or $.driver().function().
  • Removed BrowserFunctionsWithDeprecatedFunctions (class that held that attribute while it was deprecated)

0.16.0

Choose a tag to compare

@acdcjunior acdcjunior released this 07 Jul 02:35

Noteworthy changes:

  • Updated Selenium to 2.53.1
  • Tweaked .val()'s behavior on non-editable elements:
    • Warning is no longer issued.
    • It attempts to clear element, if not possible, it no longer throws exception (in other words, the clearing is a best-effort operation).
    • Even if clearing did not work, it stills types the keys. If the driver throws an exception here, it is not suppressed.

See the full list of changes here.

0.15.0

Choose a tag to compare

@acdcjunior acdcjunior released this 05 Apr 18:33

Noteworthy changes:

  • Added $().dblclick() function
  • Improved debug/error messages for $().waitUntil()

See the full list of changes here.

0.14.0

Choose a tag to compare

@acdcjunior acdcjunior released this 24 Mar 03:02

Noteworthy changes:

  • Updated selenium to 2.53.0.
  • Updated cssparser

See the full list of changes here.

0.13.0

Choose a tag to compare

@acdcjunior acdcjunior released this 09 Feb 21:01

Noteworthy changes:

  • Added $().each(<function>).
  • Updated selenium to 2.51.0.
  • Improved error messages for $().waitUntil().text().isLessThan(<number>).
  • BUG FIX: a + b selector was behaving like a ~ b (direct adjacent was behaving like general adjacent).
    • If your code breaks due to this, then change your selector from + to ~.

See the full list of changes here.

0.12.0

Choose a tag to compare

@acdcjunior acdcjunior released this 31 Jan 00:11

Noteworthy changes:

  • All selectors that aren't supported "directly" in the constructor now throw an exception advising to use .filter() or .is()

See the full list of changes here.

0.11.0

Choose a tag to compare

@acdcjunior acdcjunior released this 30 Jan 17:17

Noteworthy changes:

  • Added $("selector").filter("selector") and $("selector").filter(Predicate<WebElement> {...}) functions
  • Updated to Selenium 2.50.1
  • PhantomJS executable is now found more effectively on all OSes
  • Fixed a bug for :nth-child(n+b) (when no a was specified)
  • Updated other dependent-on libs' versions

See the full list of changes here.