com.github.markusbernhardt.selenium2library.keywords
Class JavaScript

java.lang.Object
  extended by com.github.markusbernhardt.selenium2library.keywords.BrowserManagement
      extended by com.github.markusbernhardt.selenium2library.keywords.Cookie
          extended by com.github.markusbernhardt.selenium2library.keywords.Element
              extended by com.github.markusbernhardt.selenium2library.keywords.FormElement
                  extended by com.github.markusbernhardt.selenium2library.keywords.JavaScript
Direct Known Subclasses:
Logging

public abstract class JavaScript
extends FormElement


Field Summary
protected  boolean cancelOnNextConfirmation
           
 
Fields inherited from class com.github.markusbernhardt.selenium2library.keywords.BrowserManagement
implicitWait, remoteWebDriverProxyDomain, remoteWebDriverProxyHost, remoteWebDriverProxyPassword, remoteWebDriverProxyPort, remoteWebDriverProxyUser, remoteWebDriverProxyWorkstation, timeout, webDriverCache
 
Constructor Summary
JavaScript()
           
 
Method Summary
 void alertShouldBePresent()
           
 void alertShouldBePresent(java.lang.String text)
           
 void chooseCancelOnNextConfirmation()
           
 void chooseOkOnNextConfirmation()
           
protected  java.lang.String closeAlert()
           
protected  java.lang.String closeAlert(boolean confirm)
           
 java.lang.String confirmAction()
           
 java.lang.Object executeAsyncJavascript(java.lang.String... code)
           
 java.lang.Object executeJavascript(java.lang.String... code)
           
 java.lang.String getAlertMessage()
           
protected  java.lang.String getJavascriptToExecute(java.lang.String code)
           
protected static java.lang.String readFile(java.lang.String path)
           
 
Methods inherited from class com.github.markusbernhardt.selenium2library.keywords.FormElement
checkboxShouldBeSelected, checkboxShouldNotBeSelected, chooseFile, clickButton, getCheckbox, getRadioButtons, getRadioButtonWithValue, getValueFromRadioButtons, inputPassword, inputText, inputTextIntoTextField, isFormElement, pageShouldContainButton, pageShouldContainButton, pageShouldContainButton, pageShouldContainCheckbox, pageShouldContainCheckbox, pageShouldContainCheckbox, pageShouldContainRadioButton, pageShouldContainRadioButton, pageShouldContainRadioButton, pageShouldContainTextfield, pageShouldContainTextfield, pageShouldContainTextfield, pageShouldNotContainButton, pageShouldNotContainButton, pageShouldNotContainButton, pageShouldNotContainCheckbox, pageShouldNotContainCheckbox, pageShouldNotContainCheckbox, pageShouldNotContainRadioButton, pageShouldNotContainRadioButton, pageShouldNotContainRadioButton, pageShouldNotContainTextfield, pageShouldNotContainTextfield, pageShouldNotContainTextfield, radioButtonShouldBeSetTo, radioButtonShouldNotBeSelected, selectCheckbox, selectRadioButton, submitForm, submitForm, textfieldShouldBe, textfieldShouldBe, textfieldShouldContain, textfieldShouldContain, unselectCheckbox
 
Methods inherited from class com.github.markusbernhardt.selenium2library.keywords.Element
assignIdToElement, clickElement, clickImage, clickLink, currentFrameContains, currentFrameContains, doubleClickElement, dragAndDrop, dragAndDropByOffset, elementFind, elementFind, elementShouldBeDisabled, elementShouldBeEnabled, elementShouldBeVisible, elementShouldBeVisible, elementShouldContain, elementShouldContain, elementShouldNotBeVisible, elementShouldNotBeVisible, elementTextShouldBe, elementTextShouldBe, escapeXpathValue, fetchText, fetchValue, fetchValue, focus, frameContains, frameShouldContain, frameShouldContain, getAllLinks, getElementAttribute, getHorizontalPosition, getMatchingXpathCount, getText, getValue, getValue, getVerticalPosition, helperPageShouldContainElement, helperPageShouldNotContainElement, isElementPresent, isElementPresent, isEnabled, isTextPresent, isVisible, mapAsciiKeyCodeToKey, mouseDown, mouseDownOnImage, mouseDownOnLink, mouseOut, mouseOver, mouseUp, openContextMenu, pageContains, pageShouldContain, pageShouldContain, pageShouldContainElement, pageShouldContainElement, pageShouldContainElement, pageShouldContainElement, pageShouldContainImage, pageShouldContainImage, pageShouldContainImage, pageShouldContainLink, pageShouldContainLink, pageShouldContainLink, pageShouldNotContain, pageShouldNotContain, pageShouldNotContainElement, pageShouldNotContainElement, pageShouldNotContainElement, pageShouldNotContainElement, pageShouldNotContainImage, pageShouldNotContainImage, pageShouldNotContainImage, pageShouldNotContainLink, pageShouldNotContainLink, pageShouldNotContainLink, parseAttributeLocator, pressKey, simulate, xpathShouldMatchXTimes, xpathShouldMatchXTimes, xpathShouldMatchXTimes
 
Methods inherited from class com.github.markusbernhardt.selenium2library.keywords.Cookie
deleteAllCookies, deleteCookie, getCookies, getCookieValue
 
Methods inherited from class com.github.markusbernhardt.selenium2library.keywords.BrowserManagement
closeAllBrowsers, closeBrowser, closeWindow, createDesiredCapabilities, createLocalWebDriver, createRemoteWebDriver, createWebDriver, debug, getLocation, getLogDir, getPasswordFromURL, getSeleniumImplicitWait, getSeleniumSpeed, getSeleniumTimeout, getSource, getTitle, getUserFromURL, getWindowIdentifiers, getWindowNames, getWindowTitles, goBack, goTo, html, info, locationShouldBe, locationShouldContain, log, logList, logList, logLocation, logSource, logSource, logTitle, maximizeBrowserWindow, openBrowser, openBrowser, openBrowser, openBrowser, openBrowser, openBrowser, reloadPage, selectFrame, selectWindow, selectWindow, setBrowserImplicitWait, setRemoteWebDriverProxy, setRemoteWebDriverProxy, setRemoteWebDriverProxy, setRemoteWebDriverProxy, setSeleniumImplicitWait, setSeleniumSpeed, setSeleniumTimeout, switchBrowser, titleShouldBe, trace, unselectFrame, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cancelOnNextConfirmation

protected boolean cancelOnNextConfirmation
Constructor Detail

JavaScript

public JavaScript()
Method Detail

alertShouldBePresent

public void alertShouldBePresent()

alertShouldBePresent

public void alertShouldBePresent(java.lang.String text)

chooseCancelOnNextConfirmation

public void chooseCancelOnNextConfirmation()

chooseOkOnNextConfirmation

public void chooseOkOnNextConfirmation()

confirmAction

public java.lang.String confirmAction()

executeJavascript

public java.lang.Object executeJavascript(java.lang.String... code)

executeAsyncJavascript

public java.lang.Object executeAsyncJavascript(java.lang.String... code)

getAlertMessage

public java.lang.String getAlertMessage()

closeAlert

protected java.lang.String closeAlert()

closeAlert

protected java.lang.String closeAlert(boolean confirm)

readFile

protected static java.lang.String readFile(java.lang.String path)
                                    throws java.io.IOException
Throws:
java.io.IOException

getJavascriptToExecute

protected java.lang.String getJavascriptToExecute(java.lang.String code)


Copyright © 2013. All Rights Reserved.