Skip to content

Commit

Permalink
Score the new safari options too
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Jul 13, 2018
1 parent b99fa0d commit 3d6ab46
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,18 @@ public int score(Capabilities capabilites) {

if (BrowserType.SAFARI.equals(capabilites.getBrowserName())) {
score++;
} else if ("Safari Technology Preview".equals(capabilites.getBrowserName())) {
score++;
}

if (capabilites.getCapability(SafariOptions.CAPABILITY) != null) {
score++;
}

if (capabilites.getCapability("se:safari:techPreview") != null) {
score++;
}

return score;
}

Expand Down
3 changes: 3 additions & 0 deletions java/client/src/org/openqa/selenium/safari/SafariOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,13 @@ public class SafariOptions extends MutableCapabilities {

/**
* Key used to store SafariOptions in a {@link Capabilities} object.
* @deprecated No replacement. Use the methods on this class
*/
@Deprecated
public static final String CAPABILITY = "safari.options";

private interface Option {
@Deprecated
String TECHNOLOGY_PREVIEW = "technologyPreview";
String TECH_PREVIEW = "se:safari:techPreview";
}
Expand Down

0 comments on commit 3d6ab46

Please sign in to comment.