public class JavaScriptUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
dispatchEvent(String eventType,
org.openqa.selenium.WebElement element,
org.openqa.selenium.WebDriver webDriver) |
static void |
dispatchMouseEvent(String event,
org.openqa.selenium.WebElement el,
org.openqa.selenium.WebDriver driver)
Dispatches a javascript mouse event in the browser on a specified element
|
static <T> T |
execute(Class<T> expectedReturn,
String js,
org.openqa.selenium.WebDriver driver,
Object... arguments) |
static <T> T |
execute(String js,
org.openqa.selenium.WebDriver driver,
Object... arguments) |
static String |
innerHtml(org.openqa.selenium.WebElement element,
org.openqa.selenium.WebDriver driver)
Deprecated.
|
static boolean |
isScriptLoaded(String jsScriptName,
org.openqa.selenium.WebDriver webDriver) |
static boolean |
loadScript(String jsScriptName,
org.openqa.selenium.WebDriver driver)
Will load a javascript file from the class loader.
|
@Deprecated public static String innerHtml(org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver driver)
WebElementUtil.getInnerHtml(WebElement, WebDriver)public static void dispatchEvent(String eventType, org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver webDriver)
public static void dispatchMouseEvent(String event, org.openqa.selenium.WebElement el, org.openqa.selenium.WebDriver driver)
event - The name of the event to dispatch. eg. load.el - The element to fire the event on.driver - the webdriver instance that executes the javascript event.public static boolean loadScript(String jsScriptName, org.openqa.selenium.WebDriver driver)
jsScriptName - the name of the javascipt filedriver - the webdriver to execute the javascriptpublic static boolean isScriptLoaded(String jsScriptName, org.openqa.selenium.WebDriver webDriver)
public static <T> T execute(String js, org.openqa.selenium.WebDriver driver, Object... arguments)
Copyright © 2015 Atlassian. All rights reserved.