|
1 | 1 | /* |
2 | | - * Copyright (c) 2016 seleniumQuery authors |
| 2 | + * Copyright (c) 2017 seleniumQuery authors |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
|
16 | 16 |
|
17 | 17 | package integration.io.github.seleniumquery.by; |
18 | 18 |
|
19 | | -import com.gargoylesoftware.htmlunit.BrowserVersion; |
20 | | -import io.github.seleniumquery.utils.DriverVersionUtils; |
| 19 | +import static org.hamcrest.Matchers.is; |
| 20 | +import static org.junit.Assert.assertThat; |
| 21 | +import static testinfrastructure.testdouble.org.openqa.selenium.WebDriverDummy.createWebDriverDummy; |
| 22 | + |
| 23 | +import java.util.List; |
| 24 | + |
21 | 25 | import org.junit.Before; |
22 | 26 | import org.junit.Test; |
23 | 27 | import org.openqa.selenium.WebDriver; |
24 | 28 | import org.openqa.selenium.WebElement; |
25 | 29 | import org.openqa.selenium.htmlunit.HtmlUnitDriver; |
| 30 | + |
| 31 | +import com.gargoylesoftware.htmlunit.BrowserVersion; |
| 32 | +import io.github.seleniumquery.utils.DriverVersionUtils; |
26 | 33 | import testinfrastructure.testdouble.PseudoTestDoubleException; |
27 | 34 | import testinfrastructure.testdouble.org.openqa.selenium.WebDriverDummy; |
28 | 35 | import testinfrastructure.testutils.DriverInTest; |
29 | 36 |
|
30 | | -import static org.hamcrest.Matchers.is; |
31 | | -import static org.junit.Assert.assertThat; |
32 | | -import static testinfrastructure.testdouble.org.openqa.selenium.WebDriverDummy.createWebDriverDummy; |
33 | | - |
34 | 37 | public class DriverVersionUtilsTest { |
35 | 38 |
|
36 | 39 | @Before |
@@ -76,7 +79,7 @@ public void hasNativeSupportForPseudo__should_return_true_if_driver_doesnt_throw |
76 | 79 | // given |
77 | 80 | final String supportedPseudo = ":some-supported-pseudo"; |
78 | 81 | class WebDriverThatSupportsSomePseudo extends WebDriverDummy { |
79 | | - @Override public WebElement findElementByCssSelector(String s) { assertThat(s, is("#AAA_SomeIdThatShouldNotExist" + supportedPseudo)); return null; } |
| 82 | + @Override public List<WebElement> findElementsByCssSelector(String s) { assertThat(s, is("#AAA_SomeIdThatShouldNotExist" + supportedPseudo)); return null; } |
80 | 83 | } |
81 | 84 | DriverVersionUtils driverVersionUtils = new DriverVersionUtils(); |
82 | 85 | WebDriver webDriver = new WebDriverThatSupportsSomePseudo(); |
|
0 commit comments