From cee8f7e556062aa737762f92392b14fcc5099c85 Mon Sep 17 00:00:00 2001 From: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com> Date: Thu, 9 Mar 2023 16:44:40 +0200 Subject: [PATCH] fix: Add 'remote allow origins' option to chrome driver Fixes status code=403 errors when running tests with chrome driver described here https://stackoverflow.com/questions/75678572/java-io-ioexception-invalid-status-code-403-text-forbidden --- .../java/com/vaadin/testbench/parallel/setup/LocalDriver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vaadin-testbench-shared/src/main/java/com/vaadin/testbench/parallel/setup/LocalDriver.java b/vaadin-testbench-shared/src/main/java/com/vaadin/testbench/parallel/setup/LocalDriver.java index 36f57c93a..5ad5427ea 100644 --- a/vaadin-testbench-shared/src/main/java/com/vaadin/testbench/parallel/setup/LocalDriver.java +++ b/vaadin-testbench-shared/src/main/java/com/vaadin/testbench/parallel/setup/LocalDriver.java @@ -74,7 +74,7 @@ static public WebDriver createDriver( // --ignore-certifcate-errors". // #14319 ChromeOptions options = new ChromeOptions(); - options.addArguments("--test-type "); + options.addArguments("--test-type ", "--remote-allow-origins=*"); options.setHeadless(Parameters.isHeadless()); driver = new ChromeDriver(options); } else if (BrowserUtil.isSafari(desiredCapabilities)) {