Releases: seleniumQuery/seleniumQuery
0.20.0
0.19.0
-
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); } });
- Credits and thanks to @gmkumar2005
0.18.0
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 automatic driver download (backed by webdrivermanager)
-
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");
- Added
-
.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()
- Added
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
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 theSeleniumQueryBrowser
instance used by the globalSeleniumQuery.$
field. - Update some dependencies, such as
commons-lang3
from 3.5 to 3.6, as well as addedcommons-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()
.
- The new place for the functions that were in
- Removed
BrowserFunctionsWithDeprecatedFunctions
(class that held that attribute while it was deprecated)
0.16.0
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.
0.15.0
Noteworthy changes:
- Added
$().dblclick()
function - Improved debug/error messages for
$().waitUntil()
0.14.0
Noteworthy changes:
- Updated selenium to 2.53.0.
- Added
htmlunit-driver:2.20
as dependency because it is not included in selenium-java anymore
- Added
- Updated cssparser
0.13.0
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 likea ~ b
(direct adjacent was behaving like general adjacent).- If your code breaks due to this, then change your selector from
+
to~
.
- If your code breaks due to this, then change your selector from
0.12.0
Noteworthy changes:
- All selectors that aren't supported "directly" in the constructor now throw an exception advising to use .filter() or .is()
0.11.0
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 noa
was specified) - Updated other dependent-on libs' versions