mirror of https://github.com/OpenVidu/openvidu.git
openvidu-test-browsers: clean pom dependencies. Update browser users
parent
5c8779b1ff
commit
ce204c661d
|
@ -77,16 +77,6 @@
|
|||
<artifactId>selenium-java</artifactId>
|
||||
<version>${version.selenium}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>selenium-chrome-driver</artifactId>
|
||||
<version>${version.selenium}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>selenium-firefox-driver</artifactId>
|
||||
<version>${version.selenium}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
|
@ -100,7 +90,7 @@
|
|||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.13.1</version>
|
||||
<version>${version.junit}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -22,6 +22,7 @@ import java.net.URL;
|
|||
|
||||
import org.openqa.selenium.UnexpectedAlertBehaviour;
|
||||
import org.openqa.selenium.firefox.FirefoxDriver;
|
||||
import org.openqa.selenium.firefox.FirefoxOptions;
|
||||
import org.openqa.selenium.firefox.FirefoxProfile;
|
||||
import org.openqa.selenium.remote.CapabilityType;
|
||||
import org.openqa.selenium.remote.DesiredCapabilities;
|
||||
|
@ -54,7 +55,7 @@ public class FirefoxUser extends BrowserUser {
|
|||
}
|
||||
} else {
|
||||
log.info("Using local web driver");
|
||||
this.driver = new FirefoxDriver(capabilities);
|
||||
this.driver = new FirefoxDriver(new FirefoxOptions(capabilities));
|
||||
}
|
||||
|
||||
this.configureDriver();
|
||||
|
|
|
@ -4,10 +4,8 @@ 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;
|
||||
|
||||
|
@ -16,27 +14,28 @@ public class OperaUser extends BrowserUser {
|
|||
public OperaUser(String userName, int timeOfWaitInSeconds) {
|
||||
super(userName, timeOfWaitInSeconds);
|
||||
|
||||
OperaOptions options = new OperaOptions();
|
||||
options.setBinary("/usr/bin/opera");
|
||||
DesiredCapabilities capabilities = DesiredCapabilities.operaBlink();
|
||||
capabilities.setAcceptInsecureCerts(true);
|
||||
capabilities.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR, UnexpectedAlertBehaviour.IGNORE);
|
||||
|
||||
OperaOptions options = new OperaOptions();
|
||||
// This flag avoids to grant the user media
|
||||
options.addArguments("--use-fake-ui-for-media-stream");
|
||||
// This flag fakes user media with synthetic video
|
||||
options.addArguments("--use-fake-device-for-media-stream");
|
||||
capabilities.setCapability(OperaOptions.CAPABILITY, options);
|
||||
// This flag selects the entire screen as video source when screen sharing
|
||||
options.addArguments("--auto-select-desktop-capture-source=Entire screen");
|
||||
options.merge(capabilities);
|
||||
|
||||
String REMOTE_URL = System.getProperty("REMOTE_URL_OPERA");
|
||||
if (REMOTE_URL != null) {
|
||||
log.info("Using URL {} to connect to remote web driver", REMOTE_URL);
|
||||
try {
|
||||
this.driver = new RemoteWebDriver(new URL(REMOTE_URL), capabilities);
|
||||
this.driver = new RemoteWebDriver(new URL(REMOTE_URL), options);
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
log.info("Using local web driver");
|
||||
this.driver = new OperaDriver(capabilities);
|
||||
this.driver = new OperaDriver(options);
|
||||
}
|
||||
|
||||
this.driver.manage().timeouts().setScriptTimeout(this.timeOfWaitInSeconds, TimeUnit.SECONDS);
|
||||
|
|
|
@ -91,18 +91,6 @@
|
|||
<version>${version.selenium}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>selenium-chrome-driver</artifactId>
|
||||
<version>${version.selenium}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>selenium-firefox-driver</artifactId>
|
||||
<version>${version.selenium}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>selenium-api</artifactId>
|
||||
|
@ -123,7 +111,7 @@
|
|||
<dependency>
|
||||
<groupId>org.jcodec</groupId>
|
||||
<artifactId>jcodec-javase</artifactId>
|
||||
<version>0.2.3</version>
|
||||
<version>${version.jcodec}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
Loading…
Reference in New Issue