diff --git a/src/test/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcherTest.java b/src/test/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcherTest.java index 73cfbbd0..0613776e 100644 --- a/src/test/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcherTest.java +++ b/src/test/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcherTest.java @@ -247,7 +247,7 @@ private void configureJobThrottling(FreeStyleProject project) throws IOException boolean buttonFound = false; for (HtmlButton button : buttons) { - if (button.getTextContent().equals(buttonText)) { + if (button.getTextContent().trim().equals(buttonText)) { buttonFound = true; String checkboxName = "throttleEnabled"; HtmlElement checkbox = page.getElementByName(checkboxName); @@ -376,7 +376,7 @@ private boolean buttonFoundThusFormSubmitted(HtmlForm form, List but throws IOException { boolean buttonFound = false; for (HtmlButton button : buttons) { - if (button.getTextContent().equals(buttonText)) { + if (button.getTextContent().trim().equals(buttonText)) { buttonFound = true; button.click(); break;