aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/tb3
diff options
context:
space:
mode:
authorDmitrii Rogozin <dmitrii@vaadin.com>2014-07-29 11:05:51 +0300
committerVaadin Code Review <review@vaadin.com>2014-07-30 08:47:05 +0000
commit2f5df41f2ec6b3b4a3be0ffc454d47c4502a8364 (patch)
tree4b1c56dd3e3fe2a062e2eade667b3cc1213d34af /uitest/src/com/vaadin/tests/tb3
parent02480c272900aee7df260a22df8aef144ca1f2b4 (diff)
downloadvaadin-framework-2f5df41f2ec6b3b4a3be0ffc454d47c4502a8364.tar.gz
vaadin-framework-2f5df41f2ec6b3b4a3be0ffc454d47c4502a8364.zip
Remove browser warning when running tests locally on Chrome (#14319)
Change-Id: If621e342f6680eeb6ae0aeb3f2dc38e8160316c8
Diffstat (limited to 'uitest/src/com/vaadin/tests/tb3')
-rw-r--r--uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java25
1 files changed, 16 insertions, 9 deletions
diff --git a/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java b/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java
index 15ca97f701..ff824ad98a 100644
--- a/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java
+++ b/uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java
@@ -1,12 +1,12 @@
/*
* Copyright 2000-2013 Vaadind Ltd.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -28,6 +28,7 @@ import java.util.Properties;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
+import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.firefox.FirefoxBinary;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.phantomjs.PhantomJSDriver;
@@ -41,7 +42,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest.Browser;
* Provides values for parameters which depend on where the test is run.
* Parameters should be configured in work/eclipse-run-selected-test.properties.
* A template is available in uitest/.
- *
+ *
* @author Vaadin Ltd
*/
public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
@@ -105,7 +106,7 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
/**
* Gets the hostname that tests are configured to use.
- *
+ *
* @return the host name configuration value
*/
public static String getConfiguredDeploymentHostname() {
@@ -125,7 +126,7 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
/**
* Gets the port that tests are configured to use.
- *
+ *
* @return the port configuration value
*/
public static int getConfiguredDeploymentPort() {
@@ -142,7 +143,7 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
/**
* Tries to automatically determine the IP address of the machine the test
* is running on.
- *
+ *
* @return An IP address of one of the network interfaces in the machine.
* @throws RuntimeException
* if there was an error or no IP was found
@@ -179,7 +180,7 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
/*
* (non-Javadoc)
- *
+ *
* @see com.vaadin.tests.tb3.AbstractTB3Test#setupLocalDriver()
*/
@Override
@@ -209,7 +210,13 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
+ " containing the path of your local ChromeDriver installation.");
}
System.setProperty("webdriver.chrome.driver", chromeDriverPath);
- driver = new ChromeDriver();
+
+ // Tells chrome not to show warning
+ // "You are using an unsupported command-line flag: --ignore-certifcate-errors".
+ // #14319
+ ChromeOptions options = new ChromeOptions();
+ options.addArguments("--test-type ");
+ driver = new ChromeDriver(options);
} else if (BrowserUtil.isSafari(desiredCapabilities)) {
driver = new SafariDriver();
} else if (BrowserUtil.isPhantomJS(desiredCapabilities)) {