/** * Simulates a user hovering a mouse over the specified element at specific coordinates relative to element. * * @param locator * element's locator * @param coordString * specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the * locator. */ public void mouseOverAt(String locator, String coordString) { commandProcessor.doCommand("mouseOverAt", new String[] { locator, coordString }); }
/** * Verifies that the specified attribute is defined for the element. * * @param elementLocator * an element locator * @param attributeName * a name of an attribute * @return true if the element's attribute is present, false otherwise */ public boolean isAttributePresent(String elementLocator, String attributeName) { return commandProcessor.getBoolean("isAttributePresent", new String[] { elementLocator, attributeName }); }
/** * Returns the number of elements with given jQuery locator. * * @param jqueryLocator * jQuery locator of an element * @return number of found elements */ public Number getJQueryCount(String jqueryLocator) { return commandProcessor.getNumber("getJQueryCount", new String[] { jqueryLocator }); }
public String getAlert() { return commandProcessor.getString("getAlert", new String[] {}); }
public String[] getAllButtons() { return commandProcessor.getStringArray("getAllButtons", new String[] {}); }
@Override public void start() { delegate.start(); }
public void start() { try { commandProcessor.start(); } catch (Exception e) { final String message = e.getMessage(); if (message != null && message.startsWith("Connection refused")) { throw new RuntimeException("Could not contact Selenium Server; have you started it on '"+commandProcessor.getRemoteControlServerLocation() + "' ?\nRead more at http://seleniumhq.org/projects/remote-control/not-started.html\n" + e.getMessage()); } throw new RuntimeException("Could not start Selenium session: " + e.getMessage(), e); } }
@Override public void stop() { delegate.stop(); }
/** * @since 5.1.0.0 */ @Override public void setExtensionJs(String extensionJs) { delegate.setExtensionJs(extensionJs); }
/** * @since 5.1.0.0 */ @Override public String getRemoteControlServerLocation() { return delegate.getRemoteControlServerLocation(); }
public String getBodyText() { return commandProcessor.getString("getBodyText", new String[] {}); }
public String[] getAttributeFromAllWindows(String attributeName) { return commandProcessor.getStringArray("getAttributeFromAllWindows", new String[] {attributeName,}); }
/** * @since 5.1.0.0 */ @Override public void start(String optionsString) { delegate.start(optionsString); }
@Override public void stop() { delegate.stop(); }
/** * @since 5.1.0.0 */ @Override public void setExtensionJs(String extensionJs) { delegate.setExtensionJs(extensionJs); }
/** * @since 5.1.0.0 */ @Override public String getRemoteControlServerLocation() { return delegate.getRemoteControlServerLocation(); }
/** * Aligns screen to top (resp. bottom) of element given by locator. * * @param locator * of element which should be screen aligned to * @param alignToTop * should be top border of screen aligned to top border of element */ public void scrollIntoView(String locator, String alignToTop) { commandProcessor.doCommand("scrollIntoView", new String[] { locator, alignToTop }); }
public boolean getWhetherThisFrameMatchFrameExpression(String currentFrameString,String target) { return commandProcessor.getBoolean("getWhetherThisFrameMatchFrameExpression", new String[] {currentFrameString,target,}); }
public String getEval(String script) { return commandProcessor.getString("getEval", new String[] {script,}); }
public String[] getSelectedLabels(String selectLocator) { return commandProcessor.getStringArray("getSelectedLabels", new String[] {selectLocator,}); }