Skip to content

Commit

Permalink
[Grid] Adding image for Safari Technology Preview, fixes #6297
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol committed Sep 7, 2018
1 parent e36b8c0 commit 15eb701
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -17,6 +17,8 @@

package org.openqa.grid.web.servlet.console;

import com.google.common.base.Strings;

import org.openqa.grid.internal.TestSlot;
import org.openqa.selenium.remote.BrowserType;
import org.openqa.selenium.remote.DesiredCapabilities;
Expand Down Expand Up @@ -69,7 +71,7 @@ private String getConsoleIconPath(DesiredCapabilities cap) {

private String consoleIconName(DesiredCapabilities cap) {
String browserString = cap.getBrowserName();
if (browserString == null || "".equals(browserString)) {
if (Strings.isNullOrEmpty(browserString)) {
return "missingBrowserName";
}

Expand All @@ -92,8 +94,12 @@ private String consoleIconName(DesiredCapabilities cap) {
ret = BrowserType.FIREFOX;
}

} else if (browserString.startsWith("*safari")) {
ret = BrowserType.SAFARI;
} else if (browserString.toLowerCase().contains("safari")) {
if (browserString.toLowerCase().contains("technology")) {
ret = "safari_technology_preview";
} else {
ret = BrowserType.SAFARI;
}
} else if (browserString.startsWith("*googlechrome")) {
ret = BrowserType.CHROME;
} else if (browserString.startsWith("opera")) {
Expand Down

0 comments on commit 15eb701

Please sign in to comment.