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>
|
<artifactId>selenium-java</artifactId>
|
||||||
<version>${version.selenium}</version>
|
<version>${version.selenium}</version>
|
||||||
</dependency>
|
</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>
|
<dependency>
|
||||||
<groupId>com.google.code.gson</groupId>
|
<groupId>com.google.code.gson</groupId>
|
||||||
<artifactId>gson</artifactId>
|
<artifactId>gson</artifactId>
|
||||||
|
@ -100,7 +90,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<version>4.13.1</version>
|
<version>${version.junit}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
|
@ -22,6 +22,7 @@ import java.net.URL;
|
||||||
|
|
||||||
import org.openqa.selenium.UnexpectedAlertBehaviour;
|
import org.openqa.selenium.UnexpectedAlertBehaviour;
|
||||||
import org.openqa.selenium.firefox.FirefoxDriver;
|
import org.openqa.selenium.firefox.FirefoxDriver;
|
||||||
|
import org.openqa.selenium.firefox.FirefoxOptions;
|
||||||
import org.openqa.selenium.firefox.FirefoxProfile;
|
import org.openqa.selenium.firefox.FirefoxProfile;
|
||||||
import org.openqa.selenium.remote.CapabilityType;
|
import org.openqa.selenium.remote.CapabilityType;
|
||||||
import org.openqa.selenium.remote.DesiredCapabilities;
|
import org.openqa.selenium.remote.DesiredCapabilities;
|
||||||
|
@ -54,7 +55,7 @@ public class FirefoxUser extends BrowserUser {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log.info("Using local web driver");
|
log.info("Using local web driver");
|
||||||
this.driver = new FirefoxDriver(capabilities);
|
this.driver = new FirefoxDriver(new FirefoxOptions(capabilities));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.configureDriver();
|
this.configureDriver();
|
||||||
|
|
|
@ -4,10 +4,8 @@ import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.openqa.selenium.UnexpectedAlertBehaviour;
|
|
||||||
import org.openqa.selenium.opera.OperaDriver;
|
import org.openqa.selenium.opera.OperaDriver;
|
||||||
import org.openqa.selenium.opera.OperaOptions;
|
import org.openqa.selenium.opera.OperaOptions;
|
||||||
import org.openqa.selenium.remote.CapabilityType;
|
|
||||||
import org.openqa.selenium.remote.DesiredCapabilities;
|
import org.openqa.selenium.remote.DesiredCapabilities;
|
||||||
import org.openqa.selenium.remote.RemoteWebDriver;
|
import org.openqa.selenium.remote.RemoteWebDriver;
|
||||||
|
|
||||||
|
@ -16,27 +14,28 @@ public class OperaUser extends BrowserUser {
|
||||||
public OperaUser(String userName, int timeOfWaitInSeconds) {
|
public OperaUser(String userName, int timeOfWaitInSeconds) {
|
||||||
super(userName, timeOfWaitInSeconds);
|
super(userName, timeOfWaitInSeconds);
|
||||||
|
|
||||||
OperaOptions options = new OperaOptions();
|
|
||||||
options.setBinary("/usr/bin/opera");
|
|
||||||
DesiredCapabilities capabilities = DesiredCapabilities.operaBlink();
|
DesiredCapabilities capabilities = DesiredCapabilities.operaBlink();
|
||||||
capabilities.setAcceptInsecureCerts(true);
|
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");
|
options.addArguments("--use-fake-ui-for-media-stream");
|
||||||
|
// This flag fakes user media with synthetic video
|
||||||
options.addArguments("--use-fake-device-for-media-stream");
|
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");
|
String REMOTE_URL = System.getProperty("REMOTE_URL_OPERA");
|
||||||
if (REMOTE_URL != null) {
|
if (REMOTE_URL != null) {
|
||||||
log.info("Using URL {} to connect to remote web driver", REMOTE_URL);
|
log.info("Using URL {} to connect to remote web driver", REMOTE_URL);
|
||||||
try {
|
try {
|
||||||
this.driver = new RemoteWebDriver(new URL(REMOTE_URL), capabilities);
|
this.driver = new RemoteWebDriver(new URL(REMOTE_URL), options);
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log.info("Using local web driver");
|
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);
|
this.driver.manage().timeouts().setScriptTimeout(this.timeOfWaitInSeconds, TimeUnit.SECONDS);
|
||||||
|
|
|
@ -91,18 +91,6 @@
|
||||||
<version>${version.selenium}</version>
|
<version>${version.selenium}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</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>
|
<dependency>
|
||||||
<groupId>org.seleniumhq.selenium</groupId>
|
<groupId>org.seleniumhq.selenium</groupId>
|
||||||
<artifactId>selenium-api</artifactId>
|
<artifactId>selenium-api</artifactId>
|
||||||
|
@ -123,7 +111,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jcodec</groupId>
|
<groupId>org.jcodec</groupId>
|
||||||
<artifactId>jcodec-javase</artifactId>
|
<artifactId>jcodec-javase</artifactId>
|
||||||
<version>0.2.3</version>
|
<version>${version.jcodec}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
1
pom.xml
1
pom.xml
|
@ -58,6 +58,7 @@
|
||||||
<version.slf4j>1.7.30</version.slf4j>
|
<version.slf4j>1.7.30</version.slf4j>
|
||||||
<version.gson>2.8.6</version.gson>
|
<version.gson>2.8.6</version.gson>
|
||||||
<version.unirest>1.4.9</version.unirest>
|
<version.unirest>1.4.9</version.unirest>
|
||||||
|
<version.jcodec>0.2.5</version.jcodec>
|
||||||
|
|
||||||
<version.webdrivermanager>4.2.2</version.webdrivermanager>
|
<version.webdrivermanager>4.2.2</version.webdrivermanager>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue