From a08fa1e5325a8f2dd0a3ccba06dcaea618341965 Mon Sep 17 00:00:00 2001 From: Simon Stewart Date: Tue, 23 Mar 2021 10:36:13 +0000 Subject: [PATCH] [bazel] Fix the build --- .../support/locators/RelativeLocator.java | 15 --------------- .../support/locators/RelativeLocatorTest.java | 8 ++++---- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/java/client/src/org/openqa/selenium/support/locators/RelativeLocator.java b/java/client/src/org/openqa/selenium/support/locators/RelativeLocator.java index 2af069e4f0e68..1a6bab893d639 100644 --- a/java/client/src/org/openqa/selenium/support/locators/RelativeLocator.java +++ b/java/client/src/org/openqa/selenium/support/locators/RelativeLocator.java @@ -100,21 +100,6 @@ public static RelativeBy with(By by) { return new RelativeBy(by); } - public static By tagName(String tagName) { - Require.nonNull("Tag name to look for", tagName); - return By.tagName(tagName); - } - - public static By xpath(String xpathExpression) { - Require.nonNull("xpath to look for", xpathExpression); - return By.xpath(xpathExpression); - } - - public static By cssSelector(String cssSelectorExpression) { - Require.nonNull("css selector to look for", cssSelectorExpression); - return By.cssSelector(cssSelectorExpression); - } - public static class RelativeBy extends By implements By.Remotable { private final Object root; private final List> filters; diff --git a/java/client/test/org/openqa/selenium/support/locators/RelativeLocatorTest.java b/java/client/test/org/openqa/selenium/support/locators/RelativeLocatorTest.java index 95f1db0470ce1..5e28eb0a4757f 100644 --- a/java/client/test/org/openqa/selenium/support/locators/RelativeLocatorTest.java +++ b/java/client/test/org/openqa/selenium/support/locators/RelativeLocatorTest.java @@ -25,11 +25,11 @@ import java.util.List; import java.util.stream.Collectors; -import static java.util.Collections.singletonList; import static org.assertj.core.api.Assertions.assertThat; -import static org.openqa.selenium.support.locators.RelativeLocator.withTagName; -import static org.openqa.selenium.support.locators.RelativeLocator.withXpath; -import static org.openqa.selenium.support.locators.RelativeLocator.withCssSelector; +import static org.openqa.selenium.By.cssSelector; +import static org.openqa.selenium.By.tagName; +import static org.openqa.selenium.By.xpath; +import static org.openqa.selenium.support.locators.RelativeLocator.with; public class RelativeLocatorTest extends JUnit4TestBase {