From b800dfcde20129329ac602eb252d895464472f6d Mon Sep 17 00:00:00 2001 From: Puja Jagani Date: Mon, 8 Apr 2024 13:37:39 +0530 Subject: [PATCH] [java] [bidi] Enable test that pass in chrome --- .../org/openqa/selenium/bidi/script/ScriptCommandsTest.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/java/test/org/openqa/selenium/bidi/script/ScriptCommandsTest.java b/java/test/org/openqa/selenium/bidi/script/ScriptCommandsTest.java index efa79508270a2..ec5e2de6fa809 100644 --- a/java/test/org/openqa/selenium/bidi/script/ScriptCommandsTest.java +++ b/java/test/org/openqa/selenium/bidi/script/ScriptCommandsTest.java @@ -20,7 +20,6 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.assertj.core.api.AssertionsForClassTypes.assertThat; import static org.openqa.selenium.testing.Safely.safelyCall; -import static org.openqa.selenium.testing.drivers.Browser.CHROME; import static org.openqa.selenium.testing.drivers.Browser.EDGE; import static org.openqa.selenium.testing.drivers.Browser.IE; import static org.openqa.selenium.testing.drivers.Browser.SAFARI; @@ -323,7 +322,6 @@ void canCallFunctionWithOwnershipNone() { @NotYetImplemented(SAFARI) @NotYetImplemented(IE) @NotYetImplemented(EDGE) - @NotYetImplemented(CHROME) void canCallFunctionThatThrowsException() { String id = driver.getWindowHandle(); Script script = new Script(id, driver); @@ -342,8 +340,7 @@ void canCallFunctionThatThrowsException() { EvaluateResultExceptionValue exception = (EvaluateResultExceptionValue) result; assertThat(exception.getExceptionDetails().getException().getType()).isEqualTo("error"); - assertThat(exception.getExceptionDetails().getText()) - .isEqualTo("SyntaxError: expected expression, got ')'"); + assertThat(exception.getExceptionDetails().getText()).contains("SyntaxError:"); assertThat(exception.getExceptionDetails().getLineNumber()).isPositive(); assertThat(exception.getExceptionDetails().getColumnNumber()).isPositive(); assertThat(exception.getExceptionDetails().getStacktrace().getCallFrames().size()).isEqualTo(0);