![]() |
![]() |
selenium-server-standalone-2.42.2NSURE_CLEAN_SESSION = "ie.ensureCleanSession"; public static final String IE_USE_PRE_PROCESS_PROXY = "ie.usePerProcessProxy"; public static final String IE_SWITCHES = "ie.browserCommandLineSwitches"; private static final int DEFAULT_PORT = 0; public InternetExplorerDriver() { this(null, null, 0); } public InternetExplorerDriver(Capabilities capabilities) { this(null, capabilities, 0); } public InternetExplorerDriver(int port) { this(null, null, port); } public InternetExplorerDriver(InternetExplorerDriverService service) { this(service, null, 0); } public InternetExplorerDriver(InternetExplorerDriverService service, Capabilities capabilities) { this(service, capabilities, 0); } public InternetExplorerDriver(InternetExplorerDriverService service, Capabilities capabilities, int port) { if (capabilities == null) { capabilities = DesiredCapabilities.internetExplorer(); } if (service == null) { service = setupService(capabilities, port); } run(service, capabilities); } private void run(InternetExplorerDriverService service, Capabilities capabilities) { assertOnWindows(); setCommandExecutor(new DriverCommandExecutor(service)); startSession(capabilities); } public void setFileDetector(FileDetector detector) { throw new WebDriverException( "Setting the file detector only works on remote webdriver instances obtained via RemoteWebDriver"); } public <X> X getScreenshotAs(OutputType<X> target) { String base64 = execute("screenshot").getValue().toString(); return (X)target.convertFromBase64Png(base64); } protected void assertOnWindows() { Platform current = Platform.getCurrent(); if (!current.is(Platform.WINDOWS)) { throw new WebDriverException( String.format( "You appear to be running %s. The IE driver only runs on Windows.", new Object[] { current })); } } private InternetExplorerDriverService setupService(Capabilities caps, int port) { try { InternetExplorerDriverService.Builder builder = new InternetExplorerDriverService.Builder(); builder.usingPort(port); if (caps != null) { if (caps.getCapability("logFile") != null) { String value = (String)caps.getCapability("logFile"); if (value != null) { builder.withLogFile(new File(value)); } } if (caps.getCapability("logLevel") != null) { String value = (String)caps.getCapability("logLevel"); if (value != null) { builder.withLogLevel(InternetExplorerDriverLogLevel.valueOf(value)); } } if (caps.getCapability("host") != null) { String value = (String)caps.getCapability("host"); if (value != null) { builder.withHost(value); } } if (caps.getCapability("extractPath") != null) { String value = (String)caps.getCapability("extractPath"); if (value != null) { builder.withExtractPath(new File(value)); } } if (caps.getCapability("silent") != null) { Boolean value = (Boolean)caps.getCapability("silent"); if (value != null) { builder.withSilent(value); } } } return builder.build(); } catch (IllegalStateException ex) { throw Throwables.propagate(ex); } } } /* Location: * Qualified Name: org.openqa.selenium.ie.InternetExplorerDriver * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.ie; public enum InternetExplorerDriverLogLevel { TRACE, DEBUG, INFO, WARN, ERROR, FATAL; } /* Location: * Qualified Name: org.openqa.selenium.ie.InternetExplorerDriverLogLevel * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.ie; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList.Builder; import com.google.common.collect.ImmutableMap; import java.io.File; import java.io.IOException; import java.util.Map; import org.openqa.selenium.Beta; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.net.PortProber; public class InternetExplorerDriverService$Builder { private int port = 0; private File exe = null; private ImmutableMap<String, String> environment = ImmutableMap.of(); private File logFile; private InternetExplorerDriverLogLevel logLevel; private String host = null; private File extractPath = null; private Boolean silent = null; private Boolean forceCreateProcess = null; private String ieSwitches = null; public Builder usingDriverExecutable(File file) { Preconditions.checkNotNull(file); InternetExplorerDriverService.access$0(file); exe = file; return this; } public Builder usingPort(int port) { Preconditions.checkArgument(port >= 0, "Invalid port number: %d", new Object[] { Integer.valueOf(port) }); this.port = port; return this; } public Builder usingAnyFreePort() { port = 0; return this; } @Beta public Builder withEnvironment(Map<String, String> environment) { this.environment = ImmutableMap.copyOf(environment); return this; } public Builder withLogFile(File logFile) { this.logFile = logFile; return this; } public Builder withLogLevel(InternetExplorerDriverLogLevel logLevel) { this.logLevel = logLevel; return this; } public Builder withHost(String host) { this.host = host; return this; } public Builder withExtractPath(File extractPath) { this.extractPath = extractPath; return this; } public Builder withSilent(Boolean silent) { this.silent = silent; return this; } public InternetExplorerDriverService build() { if (port == 0) { port = PortProber.findFreePort(); } if (exe == null) { exe = InternetExplorerDriverService.access$1("IEDriverServer", "webdriver.ie.driver", "http://code.google.com/p/selenium/wiki/InternetExplorerDriver", "http://selenium-release.storage.googleapis.com/index.html"); } if (logFile == null) { String logFilePath = System.getProperty("webdriver.ie.driver.logfile"); if (logFilePath != null) { logFile = new File(logFilePath); } } if (logLevel == null) { String level = System.getProperty("webdriver.ie.driver.loglevel"); if (level != null) { logLevel = InternetExplorerDriverLogLevel.valueOf(level); } } if (host == null) { String hostProperty = System.getProperty("webdriver.ie.driver.host"); if (hostProperty != null) { host = hostProperty; } } if (extractPath == null) { String extractPathProperty = System.getProperty("webdriver.ie.driver.extractpath"); if (extractPathProperty != null) { extractPath = new File(extractPathProperty); } } if (silent == null) { String silentProperty = System.getProperty("webdriver.ie.driver.silent"); if (silentProperty != null) { silent = Boolean.valueOf(silentProperty); } } try { ImmutableList.Builder<String> argsBuilder = ImmutableList.builder(); argsBuilder.add(String.format("--port=%d", new Object[] { Integer.valueOf(port) })); if (logFile != null) { argsBuilder.add(String.format("--log-file=\"%s\"", new Object[] { logFile.getAbsolutePath() })); } if (logLevel != null) { argsBuilder.add(String.format("--log-level=%s", new Object[] { logLevel.toString() })); } if (host != null) { argsBuilder.add(String.format("--host=%s", new Object[] { host })); } if (extractPath != null) { argsBuilder.add(String.format("--extract-path=\"%s\"", new Object[] { extractPath.getAbsolutePath() })); } if ((silent != null) && (silent.equals(Boolean.TRUE))) { argsBuilder.add("--silent"); } return new InternetExplorerDriverService(exe, port, argsBuilder.build(), environment, null); } catch (IOException e) { throw new WebDriverException(e); } } } /* Location: * Qualified Name: org.openqa.selenium.ie.InternetExplorerDriverService.Builder * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.ie; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList.Builder; import com.google.common.collect.ImmutableMap; import java.io.File; import java.io.IOException; import java.util.Map; import org.openqa.selenium.Beta; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.net.PortProber; import org.openqa.selenium.remote.service.DriverService; public class InternetExplorerDriverService extends DriverService { public static final String IE_DRIVER_EXE_PROPERTY = "webdriver.ie.driver"; public static final String IE_DRIVER_LOGFILE_PROPERTY = "webdriver.ie.driver.logfile"; public static final String IE_DRIVER_LOGLEVEL_PROPERTY = "webdriver.ie.driver.loglevel"; public static final String IE_DRIVER_HOST_PROPERTY = "webdriver.ie.driver.host"; public static final String IE_DRIVER_EXTRACT_PATH_PROPERTY = "webdriver.ie.driver.extractpath"; public static final String IE_DRIVER_SILENT_PROPERTY = "webdriver.ie.driver.silent"; private InternetExplorerDriverService(File executable, int port, ImmutableList<String> args, ImmutableMap<String, String> environment) throws IOException { super(executable, port, args, environment); } public static InternetExplorerDriverService createDefaultService() { return new Builder().usingAnyFreePort().build(); } public static class Builder { private int port = 0; private File exe = null; private ImmutableMap<String, String> environment = ImmutableMap.of(); private File logFile; private InternetExplorerDriverLogLevel logLevel; private String host = null; private File extractPath = null; private Boolean silent = null; private Boolean forceCreateProcess = null; private String ieSwitches = null; public Builder usingDriverExecutable(File file) { Preconditions.checkNotNull(file); InternetExplorerDriverService.checkExecutable(file); exe = file; return this; } public Builder usingPort(int port) { Preconditions.checkArgument(port >= 0, "Invalid port number: %d", new Object[] { Integer.valueOf(port) }); this.port = port; return this; } public Builder usingAnyFreePort() { port = 0; return this; } @Beta public Builder withEnvironment(Map<String, String> environment) { this.environment = ImmutableMap.copyOf(environment); return this; } public Builder withLogFile(File logFile) { this.logFile = logFile; return this; } public Builder withLogLevel(InternetExplorerDriverLogLevel logLevel) { this.logLevel = logLevel; return this; } public Builder withHost(String host) { this.host = host; return this; } public Builder withExtractPath(File extractPath) { this.extractPath = extractPath; return this; } public Builder withSilent(Boolean silent) { this.silent = silent; return this; } public InternetExplorerDriverService build() { if (port == 0) { port = PortProber.findFreePort(); } if (exe == null) { exe = InternetExplorerDriverService.findExecutable("IEDriverServer", "webdriver.ie.driver", "http://code.google.com/p/selenium/wiki/InternetExplorerDriver", "http://selenium-release.storage.googleapis.com/index.html"); } if (logFile == null) { String logFilePath = System.getProperty("webdriver.ie.driver.logfile"); if (logFilePath != null) { logFile = new File(logFilePath); } } if (logLevel == null) { String level = System.getProperty("webdriver.ie.driver.loglevel"); if (level != null) { logLevel = InternetExplorerDriverLogLevel.valueOf(level); } } if (host == null) { String hostProperty = System.getProperty("webdriver.ie.driver.host"); if (hostProperty != null) { host = hostProperty; } } if (extractPath == null) { String extractPathProperty = System.getProperty("webdriver.ie.driver.extractpath"); if (extractPathProperty != null) { extractPath = new File(extractPathProperty); } } if (silent == null) { String silentProperty = System.getProperty("webdriver.ie.driver.silent"); if (silentProperty != null) { silent = Boolean.valueOf(silentProperty); } } try { ImmutableList.Builder<String> argsBuilder = ImmutableList.builder(); argsBuilder.add(String.format("--port=%d", new Object[] { Integer.valueOf(port) })); if (logFile != null) { argsBuilder.add(String.format("--log-file=\"%s\"", new Object[] { logFile.getAbsolutePath() })); } if (logLevel != null) { argsBuilder.add(String.format("--log-level=%s", new Object[] { logLevel.toString() })); } if (host != null) { argsBuilder.add(String.format("--host=%s", new Object[] { host })); } if (extractPath != null) { argsBuilder.add(String.format("--extract-path=\"%s\"", new Object[] { extractPath.getAbsolutePath() })); } if ((silent != null) && (silent.equals(Boolean.TRUE))) { argsBuilder.add("--silent"); } return new InternetExplorerDriverService(exe, port, argsBuilder.build(), environment, null); } catch (IOException e) { throw new WebDriverException(e); } } } } /* Location: * Qualified Name: org.openqa.selenium.ie.InternetExplorerDriverService * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; public abstract interface Action { public abstract void perform(); } /* Location: * Qualified Name: org.openqa.selenium.interactions.Action * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; public abstract interface HasInputDevices { public abstract Keyboard getKeyboard(); public abstract Mouse getMouse(); } /* Location: * Qualified Name: org.openqa.selenium.interactions.HasInputDevices * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; public abstract interface HasTouchScreen { public abstract TouchScreen getTouch(); } /* Location: * Qualified Name: org.openqa.selenium.interactions.HasTouchScreen * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; import org.openqa.selenium.WebDriverException; public class InvalidCoordinatesException extends WebDriverException { public InvalidCoordinatesException(String message) { super(message); } } /* Location: * Qualified Name: org.openqa.selenium.interactions.InvalidCoordinatesException * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; public abstract interface Keyboard { public abstract void sendKeys(CharSequence... paramVarArgs); public abstract void pressKey(CharSequence paramCharSequence); public abstract void releaseKey(CharSequence paramCharSequence); } /* Location: * Qualified Name: org.openqa.selenium.interactions.Keyboard * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; import org.openqa.selenium.interactions.internal.Coordinates; public abstract interface Mouse { public abstract void click(Coordinates paramCoordinates); public abstract void doubleClick(Coordinates paramCoordinates); public abstract void mouseDown(Coordinates paramCoordinates); public abstract void mouseUp(Coordinates paramCoordinates); public abstract void mouseMove(Coordinates paramCoordinates); public abstract void mouseMove(Coordinates paramCoordinates, long paramLong1, long paramLong2); public abstract void contextClick(Coordinates paramCoordinates); } /* Location: * Qualified Name: org.openqa.selenium.interactions.Mouse * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; import org.openqa.selenium.WebDriverException; public class MoveTargetOutOfBoundsException extends WebDriverException { public MoveTargetOutOfBoundsException(String message) { super(message); } public MoveTargetOutOfBoundsException(Throwable cause) { super(cause); } public MoveTargetOutOfBoundsException(String message, Throwable cause) { super(message, cause); } } /* Location: * Qualified Name: org.openqa.selenium.interactions.MoveTargetOutOfBoundsException * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; import org.openqa.selenium.interactions.internal.Coordinates; public abstract interface TouchScreen { public abstract void singleTap(Coordinates paramCoordinates); public abstract void down(int paramInt1, int paramInt2); public abstract void up(int paramInt1, int paramInt2); public abstract void move(int paramInt1, int paramInt2); public abstract void scroll(Coordinates paramCoordinates, int paramInt1, int paramInt2); public abstract void doubleTap(Coordinates paramCoordinates); public abstract void longPress(Coordinates paramCoordinates); public abstract void scroll(int paramInt1, int paramInt2); public abstract void flick(int paramInt1, int paramInt2); public abstract void flick(Coordinates paramCoordinates, int paramInt1, int paramInt2, int paramInt3); } /* Location: * Qualified Name: org.openqa.selenium.interactions.TouchScreen * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions.internal; import org.openqa.selenium.Point; public abstract interface Coordinates { public abstract Point onScreen(); public abstract Point inViewPort(); public abstract Point onPage(); public abstract Object getAuxiliary(); } /* Location: * Qualified Name: org.openqa.selenium.interactions.internal.Coordinates * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.internal.Locatable; public class Actions { protected Mouse mouse; protected Keyboard keyboard; protected CompositeAction action; public Actions(WebDriver driver) { this(((HasInputDevices)driver).getKeyboard(), ((HasInputDevices)driver).getMouse()); } public Actions(Keyboard keyboard, Mouse mouse) { this.mouse = mouse; this.keyboard = keyboard; resetCompositeAction(); } public Actions(Keyboard keyboard) { this.keyboard = keyboard; resetCompositeAction(); } private void resetCompositeAction() { action = new CompositeAction(); } public Actions keyDown(Keys theKey) { return keyDown(null, theKey); } public Actions keyDown(WebElement element, Keys theKey) { action.addAction(new KeyDownAction(keyboard, mouse, (Locatable)element, theKey)); return this; } public Actions keyUp(Keys theKey) { return keyUp(null, theKey); } public Actions keyUp(WebElement element, Keys theKey) { action.addAction(new KeyUpAction(keyboard, mouse, (Locatable)element, theKey)); return this; } public Actions sendKeys(CharSequence... keysToSend) { return sendKeys(null, keysToSend); } public Actions sendKeys(WebElement element, CharSequence... keysToSend) { action.addAction(new SendKeysAction(keyboard, mouse, (Locatable)element, keysToSend)); return this; } public Actions clickAndHold(WebElement onElement) { action.addAction(new ClickAndHoldAction(mouse, (Locatable)onElement)); return this; } public Actions clickAndHold() { return clickAndHold(null); } public Actions release(WebElement onElement) { action.addAction(new ButtonReleaseAction(mouse, (Locatable)onElement)); return this; } public Actions release() { return release(null); } public Actions click(WebElement onElement) { action.addAction(new ClickAction(mouse, (Locatable)onElement)); return this; } public Actions click() { return click(null); } public Actions doubleClick(WebElement onElement) { action.addAction(new DoubleClickAction(mouse, (Locatable)onElement)); return this; } public Actions doubleClick() { return doubleClick(null); } public Actions moveToElement(WebElement toElement) { action.addAction(new MoveMouseAction(mouse, (Locatable)toElement)); return this; } public Actions moveToElement(WebElement toElement, int xOffset, int yOffset) { action.addAction(new MoveToOffsetAction(mouse, (Locatable)toElement, xOffset, yOffset)); return this; } public Actions moveByOffset(int xOffset, int yOffset) { action.addAction(new MoveToOffsetAction(mouse, null, xOffset, yOffset)); return this; } public Actions contextClick(WebElement onElement) { action.addAction(new ContextClickAction(mouse, (Locatable)onElement)); return this; } public Actions contextClick() { return contextClick(null); } public Actions dragAndDrop(WebElement source, WebElement target) { action.addAction(new ClickAndHoldAction(mouse, (Locatable)source)); action.addAction(new MoveMouseAction(mouse, (Locatable)target)); action.addAction(new ButtonReleaseAction(mouse, (Locatable)target)); return this; } public Actions dragAndDropBy(WebElement source, int xOffset, int yOffset) { action.addAction(new ClickAndHoldAction(mouse, (Locatable)source)); action.addAction(new MoveToOffsetAction(mouse, null, xOffset, yOffset)); action.addAction(new ButtonReleaseAction(mouse, null)); return this; } @Deprecated public Actions pause(long pause) { action.addAction(new PauseAction(pause)); return this; } public Action build() { CompositeAction toReturn = action; resetCompositeAction(); return toReturn; } public void perform() { build().perform(); } } /* Location: * Qualified Name: org.openqa.selenium.interactions.Actions * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; import org.openqa.selenium.interactions.internal.MouseAction; import org.openqa.selenium.internal.Locatable; public class ButtonReleaseAction extends MouseAction implements Action { public ButtonReleaseAction(Mouse mouse, Locatable locationProvider) { super(mouse, locationProvider); } public void perform() { moveToLocation(); mouse.mouseUp(getActionLocation()); } } /* Location: * Qualified Name: org.openqa.selenium.interactions.ButtonReleaseAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; import org.openqa.selenium.interactions.internal.MouseAction; import org.openqa.selenium.internal.Locatable; public class ClickAction extends MouseAction implements Action { public ClickAction(Mouse mouse, Locatable locationProvider) { super(mouse, locationProvider); } public void perform() { moveToLocation(); mouse.click(getActionLocation()); } } /* Location: * Qualified Name: org.openqa.selenium.interactions.ClickAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; import org.openqa.selenium.interactions.internal.MouseAction; import org.openqa.selenium.internal.Locatable; public class ClickAndHoldAction extends MouseAction implements Action { public ClickAndHoldAction(Mouse mouse, Locatable locationProvider) { super(mouse, locationProvider); } public void perform() { moveToLocation(); mouse.mouseDown(getActionLocation()); } } /* Location: * Qualified Name: org.openqa.selenium.interactions.ClickAndHoldAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; import java.util.ArrayList; import java.util.List; public class CompositeAction implements Action { private List<Action> actionsList = new ArrayList(); public void perform() { for (Action action : actionsList) { action.perform(); } } public CompositeAction addAction(Action action) { actionsList.add(action); return this; } public int getNumberOfActions() { return actionsList.size(); } } /* Location: * Qualified Name: org.openqa.selenium.interactions.CompositeAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; import org.openqa.selenium.interactions.internal.MouseAction; import org.openqa.selenium.internal.Locatable; public class ContextClickAction extends MouseAction implements Action { public ContextClickAction(Mouse mouse, Locatable where) { super(mouse, where); } public void perform() { moveToLocation(); mouse.contextClick(getActionLocation()); } } /* Location: * Qualified Name: org.openqa.selenium.interactions.ContextClickAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; import org.openqa.selenium.interactions.internal.MouseAction; import org.openqa.selenium.internal.Locatable; public class DoubleClickAction extends MouseAction implements Action { public DoubleClickAction(Mouse mouse, Locatable locationProvider) { super(mouse, locationProvider); } public void perform() { moveToLocation(); mouse.doubleClick(getActionLocation()); } } /* Location: * Qualified Name: org.openqa.selenium.interactions.DoubleClickAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; import org.openqa.selenium.Keys; import org.openqa.selenium.interactions.internal.SingleKeyAction; import org.openqa.selenium.internal.Locatable; public class KeyDownAction extends SingleKeyAction implements Action { public KeyDownAction(Keyboard keyboard, Mouse mouse, Locatable locationProvider, Keys key) { super(keyboard, mouse, locationProvider, key); } public KeyDownAction(Keyboard keyboard, Mouse mouse, Keys key) { super(keyboard, mouse, key); } public void perform() { focusOnElement(); keyboard.pressKey(key); } } /* Location: * Qualified Name: org.openqa.selenium.interactions.KeyDownAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; import org.openqa.selenium.Keys; import org.openqa.selenium.interactions.internal.SingleKeyAction; import org.openqa.selenium.internal.Locatable; public class KeyUpAction extends SingleKeyAction implements Action { public KeyUpAction(Keyboard keyboard, Mouse mouse, Locatable locationProvider, Keys key) { super(keyboard, mouse, locationProvider, key); } public KeyUpAction(Keyboard keyboard, Mouse mouse, Keys key) { super(keyboard, mouse, key); } public void perform() { focusOnElement(); keyboard.releaseKey(key); } } /* Location: * Qualified Name: org.openqa.selenium.interactions.KeyUpAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; import org.openqa.selenium.interactions.internal.MouseAction; import org.openqa.selenium.internal.Locatable; public class MoveMouseAction extends MouseAction implements Action { public MoveMouseAction(Mouse mouse, Locatable locationProvider) { super(mouse, locationProvider); if (locationProvider == null) { throw new IllegalArgumentException("Must provide a location for a move action."); } } public void perform() { mouse.mouseMove(getActionLocation()); } } /* Location: * Qualified Name: org.openqa.selenium.interactions.MoveMouseAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; import org.openqa.selenium.interactions.internal.MouseAction; import org.openqa.selenium.internal.Locatable; public class MoveToOffsetAction extends MouseAction implements Action { private final int xOffset; private final int yOffset; public MoveToOffsetAction(Mouse mouse, Locatable locationProvider, int x, int y) { super(mouse, locationProvider); xOffset = x; yOffset = y; } public void perform() { mouse.mouseMove(getActionLocation(), xOffset, yOffset); } } /* Location: * Qualified Name: org.openqa.selenium.interactions.MoveToOffsetAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; @Deprecated public class PauseAction implements Action { private final long pause; public PauseAction(long pause) { this.pause = pause; } public void perform() { try { Thread.sleep(pause); } catch (InterruptedException localInterruptedException) {} } } /* Location: * Qualified Name: org.openqa.selenium.interactions.PauseAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions; import org.openqa.selenium.interactions.internal.KeysRelatedAction; import org.openqa.selenium.internal.Locatable; public class SendKeysAction extends KeysRelatedAction implements Action { private final CharSequence[] keysToSend; public SendKeysAction(Keyboard keyboard, Mouse mouse, Locatable locationProvider, CharSequence... keysToSend) { super(keyboard, mouse, locationProvider); this.keysToSend = keysToSend; } public SendKeysAction(Keyboard keyboard, Mouse mouse, CharSequence... keysToSend) { this(keyboard, mouse, null, keysToSend); } public void perform() { focusOnElement(); keyboard.sendKeys(keysToSend); } } /* Location: * Qualified Name: org.openqa.selenium.interactions.SendKeysAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions.internal; import org.openqa.selenium.internal.Locatable; public abstract class BaseAction { protected final Locatable where; protected BaseAction(Locatable actionLocation) { where = actionLocation; } protected BaseAction() { where = null; } } /* Location: * Qualified Name: org.openqa.selenium.interactions.internal.BaseAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions.internal; import org.openqa.selenium.internal.Locatable; public abstract class DisplayAction extends BaseAction { protected DisplayAction(Locatable locationProvider) { super(locationProvider); } protected Coordinates getActionLocation() { return where == null ? null : where.getCoordinates(); } } /* Location: * Qualified Name: org.openqa.selenium.interactions.internal.DisplayAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions.internal; import org.openqa.selenium.interactions.Keyboard; import org.openqa.selenium.interactions.Mouse; import org.openqa.selenium.internal.Locatable; public abstract class KeysRelatedAction extends BaseAction { protected final Keyboard keyboard; protected final Mouse mouse; protected KeysRelatedAction(Keyboard keyboard, Mouse mouse, Locatable locationProvider) { super(locationProvider); this.keyboard = keyboard; this.mouse = mouse; } protected void focusOnElement() { if (where != null) { mouse.click(where.getCoordinates()); } } } /* Location: * Qualified Name: org.openqa.selenium.interactions.internal.KeysRelatedAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions.internal; import org.openqa.selenium.interactions.Mouse; import org.openqa.selenium.internal.Locatable; public class MouseAction extends BaseAction { protected final Mouse mouse; protected MouseAction(Mouse mouse, Locatable locationProvider) { super(locationProvider); this.mouse = mouse; } protected Coordinates getActionLocation() { if (where == null) { return null; } return where.getCoordinates(); } protected void moveToLocation() { if (getActionLocation() != null) { mouse.mouseMove(getActionLocation()); } } } /* Location: * Qualified Name: org.openqa.selenium.interactions.internal.MouseAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions.internal; import org.openqa.selenium.Keys; import org.openqa.selenium.interactions.Keyboard; import org.openqa.selenium.interactions.Mouse; import org.openqa.selenium.internal.Locatable; public abstract class SingleKeyAction extends KeysRelatedAction { protected final Keys key; private static final Keys[] MODIFIER_KEYS = { Keys.SHIFT, Keys.CONTROL, Keys.ALT, Keys.META, Keys.COMMAND, Keys.LEFT_ALT, Keys.LEFT_CONTROL, Keys.LEFT_SHIFT }; protected SingleKeyAction(Keyboard keyboard, Mouse mouse, Keys key) { this(keyboard, mouse, null, key); } protected SingleKeyAction(Keyboard keyboard, Mouse mouse, Locatable locationProvider, Keys key) { super(keyboard, mouse, locationProvider); this.key = key; boolean isModifier = false; Keys[] arrayOfKeys; int i = (arrayOfKeys = MODIFIER_KEYS).length; for (int j = 0; j < i; j++) { Keys modifier = arrayOfKeys[j]; isModifier |= modifier.equals(key); } if (!isModifier) { throw new IllegalArgumentException("Key Down / Up events only make sense for modifier keys."); } } } /* Location: * Qualified Name: org.openqa.selenium.interactions.internal.SingleKeyAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions.internal; import org.openqa.selenium.interactions.TouchScreen; import org.openqa.selenium.internal.Locatable; public class TouchAction extends DisplayAction { protected final TouchScreen touchScreen; public TouchAction(TouchScreen touchScreen, Locatable locationProvider) { super(locationProvider); this.touchScreen = touchScreen; } } /* Location: * Qualified Name: org.openqa.selenium.interactions.internal.TouchAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions.touch; import org.openqa.selenium.interactions.Action; import org.openqa.selenium.interactions.TouchScreen; import org.openqa.selenium.interactions.internal.TouchAction; import org.openqa.selenium.internal.Locatable; public class DoubleTapAction extends TouchAction implements Action { public DoubleTapAction(TouchScreen touchScreen, Locatable locationProvider) { super(touchScreen, locationProvider); } public void perform() { touchScreen.doubleTap(getActionLocation()); } } /* Location: * Qualified Name: org.openqa.selenium.interactions.touch.DoubleTapAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions.touch; import org.openqa.selenium.interactions.Action; import org.openqa.selenium.interactions.TouchScreen; import org.openqa.selenium.interactions.internal.TouchAction; public class DownAction extends TouchAction implements Action { private final int x; private final int y; public DownAction(TouchScreen touchScreen, int x, int y) { super(touchScreen, null); this.x = x; this.y = y; } public void perform() { touchScreen.down(x, y); } } /* Location: * Qualified Name: org.openqa.selenium.interactions.touch.DownAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions.touch; import org.openqa.selenium.interactions.Action; import org.openqa.selenium.interactions.TouchScreen; import org.openqa.selenium.interactions.internal.TouchAction; import org.openqa.selenium.internal.Locatable; public class FlickAction extends TouchAction implements Action { private int xOffset; private int yOffset; private int speed; private int xSpeed; private int ySpeed; public static final int SPEED_NORMAL = 0; public static final int SPEED_FAST = 1; public FlickAction(TouchScreen touchScreen, Locatable locationProvider, int x, int y, int speed) { super(touchScreen, locationProvider); xOffset = x; yOffset = y; this.speed = speed; } public FlickAction(TouchScreen touchScreen, int xSpeed, int ySpeed) { super(touchScreen, null); this.xSpeed = xSpeed; this.ySpeed = ySpeed; } public void perform() { if (where != null) { touchScreen.flick(getActionLocation(), xOffset, yOffset, speed); } else { touchScreen.flick(xSpeed, ySpeed); } } } /* Location: * Qualified Name: org.openqa.selenium.interactions.touch.FlickAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions.touch; import org.openqa.selenium.interactions.Action; import org.openqa.selenium.interactions.TouchScreen; import org.openqa.selenium.interactions.internal.TouchAction; import org.openqa.selenium.internal.Locatable; public class LongPressAction extends TouchAction implements Action { public LongPressAction(TouchScreen touchScreen, Locatable locationProvider) { super(touchScreen, locationProvider); } public void perform() { touchScreen.longPress(getActionLocation()); } } /* Location: * Qualified Name: org.openqa.selenium.interactions.touch.LongPressAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions.touch; import org.openqa.selenium.interactions.Action; import org.openqa.selenium.interactions.TouchScreen; import org.openqa.selenium.interactions.internal.TouchAction; public class MoveAction extends TouchAction implements Action { private final int x; private final int y; public MoveAction(TouchScreen touchScreen, int x, int y) { super(touchScreen, null); this.x = x; this.y = y; } public void perform() { touchScreen.move(x, y); } } /* Location: * Qualified Name: org.openqa.selenium.interactions.touch.MoveAction * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.openqa.selenium.interactions.touch; import org.openqa.selenium.interactions.Action; import org.openqa.selenium.interactions.TouchScreen; import org.openqa.selenium.interactions.internal.TouchAction; import org.openqa.selenium.internal.Locatable; public class ScrollAction extends TouchAction implements Action { private final int xOffset; private final Further reading...For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.New!JAR listings
|