org.sahagin.runlib.external.adapter.iosdriver.IOSDriverAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sahagin Show documentation
Show all versions of sahagin Show documentation
Sahagin makes your Selenium script more readable and maintainable.
The newest version!
package org.sahagin.runlib.external.adapter.iosdriver;
import org.openqa.selenium.WebDriver;
import org.sahagin.runlib.external.adapter.Adapter;
import org.sahagin.runlib.external.adapter.AdapterContainer;
import org.sahagin.runlib.external.adapter.ResourceAdditionalTestDocsAdapter;
import org.sahagin.runlib.external.adapter.webdriver.WebDriverScreenCaptureAdapter;
import org.sahagin.share.CommonPath;
public class IOSDriverAdapter implements Adapter {
@Override
public void initialSetAdapter() {
AdapterContainer container = AdapterContainer.globalInstance();
container.addAdditionalTestDocsAdapter(new AdditionalTestDocsAdapterImpl());
}
@Override
public String getName() {
return "ios-driver";
}
// can set null
public static void setAdapter(final WebDriver driver) {
AdapterContainer container = AdapterContainer.globalInstance();
container.setScreenCaptureAdapter(new WebDriverScreenCaptureAdapter(driver));
}
private static class AdditionalTestDocsAdapterImpl extends
ResourceAdditionalTestDocsAdapter {
@Override
public String resourceDirPath() {
return CommonPath.standardAdapdaterLocaleResDirPath("java") + "/iosdriver";
}
@Override
public void classAdd() {}
@Override
public void methodAdd() {
// in alphabetical order
}
}
}