Hey i have been tying to write a code that should login to a website, everything worked fine and then this happened "org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection"
i tried searching for solutions here and added
`ChromeOptions options = new ChromeOptions();
options.addArguments("--remote-allow-origins=*");
options.addArguments("--no-sandbox");
options.addArguments("--disable-dev-shm-usage")`
Still getting the same error im compleatly stuck i would love some help here is the whole code :
`package Testing;
import static org.testng.Assert.assertTrue;
import org.apache.mave.maven.Objects;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
public class Testing2 {
private WebDriver driver;
private Objects obj;
@BeforeMethod
public void BeforeMethod() throws InterruptedException {
ChromeOptions options = new ChromeOptions();
options.addArguments("--remote-allow-origins=*");
options.addArguments("--no-sandbox");
options.addArguments("--disable-dev-shm-usage");
driver = new ChromeDriver();
driver.navigate().to("https://daatsolutions.info/jti/user-info/");
driver.manage().window().maximize();
obj = new Objects(driver);
Thread.sleep(5000);
System.out.println("---New Test---");
}
@Test
public void firstry() {
obj.im21();
assertTrue(driver.getPageSource().contains("ואתם בפנים"));
}
}
`
Tired to add this :
ChromeOptions options = new ChromeOptions(); options.addArguments("--remote-allow-origins=*"); options.addArguments("--no-sandbox"); options.addArguments("--disable-dev-shm-usage");
still getting the same error and cant reach the site