mirror of https://github.com/OpenVidu/openvidu.git
openvidu-test-browsers: ignore alerts on browsers
parent
2551e131ad
commit
dfb9fcfa75
|
@ -25,6 +25,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.openqa.selenium.UnexpectedAlertBehaviour;
|
||||
import org.openqa.selenium.chrome.ChromeDriver;
|
||||
import org.openqa.selenium.chrome.ChromeOptions;
|
||||
import org.openqa.selenium.remote.RemoteWebDriver;
|
||||
|
@ -47,7 +48,8 @@ public class ChromeUser extends BrowserUser {
|
|||
private ChromeUser(String userName, int timeOfWaitInSeconds, ChromeOptions options) {
|
||||
super(userName, timeOfWaitInSeconds);
|
||||
options.setAcceptInsecureCerts(true);
|
||||
|
||||
options.setUnhandledPromptBehaviour(UnexpectedAlertBehaviour.IGNORE);
|
||||
|
||||
options.addArguments("--disable-infobars");
|
||||
|
||||
Map<String, Object> prefs = new HashMap<String, Object>();
|
||||
|
|
|
@ -20,8 +20,10 @@ package io.openvidu.test.browsers;
|
|||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
import org.openqa.selenium.UnexpectedAlertBehaviour;
|
||||
import org.openqa.selenium.firefox.FirefoxDriver;
|
||||
import org.openqa.selenium.firefox.FirefoxProfile;
|
||||
import org.openqa.selenium.remote.CapabilityType;
|
||||
import org.openqa.selenium.remote.DesiredCapabilities;
|
||||
import org.openqa.selenium.remote.RemoteWebDriver;
|
||||
|
||||
|
@ -32,6 +34,7 @@ public class FirefoxUser extends BrowserUser {
|
|||
|
||||
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
|
||||
capabilities.setAcceptInsecureCerts(true);
|
||||
capabilities.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR, UnexpectedAlertBehaviour.IGNORE);
|
||||
FirefoxProfile profile = new FirefoxProfile();
|
||||
|
||||
// This flag avoids granting the access to the camera
|
||||
|
|
|
@ -4,8 +4,10 @@ import java.net.MalformedURLException;
|
|||
import java.net.URL;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.openqa.selenium.UnexpectedAlertBehaviour;
|
||||
import org.openqa.selenium.opera.OperaDriver;
|
||||
import org.openqa.selenium.opera.OperaOptions;
|
||||
import org.openqa.selenium.remote.CapabilityType;
|
||||
import org.openqa.selenium.remote.DesiredCapabilities;
|
||||
import org.openqa.selenium.remote.RemoteWebDriver;
|
||||
|
||||
|
@ -18,6 +20,7 @@ public class OperaUser extends BrowserUser {
|
|||
options.setBinary("/usr/bin/opera");
|
||||
DesiredCapabilities capabilities = DesiredCapabilities.operaBlink();
|
||||
capabilities.setAcceptInsecureCerts(true);
|
||||
capabilities.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR, UnexpectedAlertBehaviour.IGNORE);
|
||||
|
||||
options.addArguments("--use-fake-ui-for-media-stream");
|
||||
options.addArguments("--use-fake-device-for-media-stream");
|
||||
|
|
|
@ -57,24 +57,16 @@
|
|||
</properties>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${version.surefire.plugin}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${version.surefire.plugin}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>${version.junit.jupiter}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.github.bonigarcia</groupId>
|
||||
<artifactId>selenium-jupiter</artifactId>
|
||||
|
@ -88,7 +80,6 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>selenium-java</artifactId>
|
||||
|
@ -127,7 +118,7 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<version>${version.junit.jupiter}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
|
Loading…
Reference in New Issue