Skip to content

Commit

Permalink
+ MacSafariCaps extracted
Browse files Browse the repository at this point in the history
  • Loading branch information
Kgalkin committed Apr 24, 2019
1 parent 6d00c8d commit 8a71593
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
Expand Up @@ -74,12 +74,7 @@ private WebDriver macDriver() {
return createRemoteDriver(new SafariTechPreviewCaps(customCaps), SAFARI_TECH_PREVIEW_DIVER_NAME);
}
case SAFARI:{
return createRemoteDriver(new TeasyCaps(customCaps) {
@Override
public MutableCapabilities get() {
return new SafariOptions().merge(customCaps);
}
}, SAFARI);
return createRemoteDriver(new MacSafariCaps(customCaps), SAFARI);
}
default: {
return throwException(browserName, MAC);
Expand Down
@@ -0,0 +1,16 @@
package com.wiley.driver.factory.capabilities;

import org.openqa.selenium.MutableCapabilities;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.safari.SafariOptions;

public class MacSafariCaps extends TeasyCaps {
public MacSafariCaps(DesiredCapabilities customCaps) {
super(customCaps);
}

@Override
public MutableCapabilities get() {
return new SafariOptions().merge(customCaps);
}
}

0 comments on commit 8a71593

Please sign in to comment.