Skip to content

Commit

Permalink
chore: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylong committed Aug 1, 2024
1 parent 82ebd82 commit 4a27fbf
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package org.owasp.encoder.testing.jakarta_test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.By;
Expand Down Expand Up @@ -56,7 +56,14 @@ void shouldDisplayMessage() {
} catch (NoSuchElementException ex) {
exception = ex;
}
assertNull(exception);
assertNotNull(exception);

exception = null;
try {
second.findElement(By.tagName("script"));
} catch (NoSuchElementException ex) {
exception = ex;
}
assertNotNull(exception);
}
}

0 comments on commit 4a27fbf

Please sign in to comment.