PSEK-Fitnesse-Fixtures
2.3.x (JDK11)
|
Deprecated: This class uses Selenium 3 to automate webpages, relies on properties files for selenium settings. More...
Classes | |
class | WebdriverCommand |
The type Webdriver command. More... | |
Public Member Functions | |
SlimWebDriver (String configuration) | |
Instantiates a new Slim web driver. More... | |
void | browserBack () |
Presses the browser back button. More... | |
void | browserForward () |
Presses the browser back button. More... | |
boolean | checkIfCookieExists (String name) |
Checks if a cookie exists with the specified name . More... | |
boolean | checkTimesElementPresent (String locator, int timesPresent) |
Checks that a specific element is x times present on the page. More... | |
boolean | checkWebsiteTitle (String title) |
Checks if the title of the website matches the title supplied. More... | |
void | circumventSelenium3Limitations () |
void | click (String locator) |
Clicks on an element in the page. More... | |
void | clickAndWait (String locator) |
Clicks on an element in the page to trigger a page load. More... | |
void | clickIfOtherElementNotPresent (String elementToClick, String elementThatShoudBeAbsent) |
Click if other element not present. More... | |
void | clickIfOtherElementPresent (String elementToClick, String elementToWaitFor) |
Click if other element present. More... | |
void | clickUntilElementPresent (String elementToClick, String elementToWaitFor, long commandTimeout, int maxAttempts) |
Mag nog mooier. More... | |
void | clickUpToTimes (String locator, String numberOfTimesToExecute) |
Clicks on an element in the page for a certain number of times. More... | |
void | clickUsingAction (String locator) |
Click using action. More... | |
void | clickUsingJavascript (String locator) |
Clicks on an element in the page that is not visible i.e. More... | |
void | closeWebsite () |
Quit the browser. More... | |
void | closeWindow () |
Close the current window. More... | |
void | contextClick (String locator) |
Richt click / context click action. More... | |
int | countTimesElementPresent (String locator) |
Counts the number of times an element is present on the page. More... | |
void | defaultCommandTimeout (int seconds) |
Register the default timeout that will apply to all commands. More... | |
void | defaultPageLoadTimeout (int seconds) |
Register the default timeout that will apply to page loading actions. More... | |
void | deleteAllCookies () |
Deletes all cookies. More... | |
void | deleteCookieByName (String name) |
Delete the cookie with the specified name. More... | |
void | deselect (String locator, String value) |
Deselects an option in a select box using the specified value. More... | |
boolean | deselectAllOptions (String locator) |
Deselects all options in a select box. More... | |
void | deselectUsingLabel (String locator, String label) |
Deselects an option in a select box using the specified label. More... | |
void | disableTextbox (String locator) |
Disable textbox. More... | |
void | doubleClick (String locator) |
Doubleclicks on an element in the page. More... | |
String | downloadFile (String locator, String filename) throws Exception |
Download a file from a locator using the selenium session (cookies, login state, etc..) and save it in the java TEMP folder using the specified name. More... | |
String | downloadImage (String locator, String filename) throws Exception |
Download an image from a locator using the selenium session (cookies, login state, etc..) and save it in the java TEMP folder using the specified name. More... | |
String | downloadUrl (String url, String filename) |
Download a file from a URL using the selenium session (cookies, login state, etc..) and save it in the java TEMP folder using the specified name. More... | |
void | enableTextbox (String locator) |
Enable textbox. More... | |
void | executeJavaScript (String script) |
Executes the specified javascript in the browser. More... | |
String | executeJavaScriptWithReturnValue (String script) |
Execute java script with return value string. More... | |
WebElement | findElement (String locator) |
Find element web element. More... | |
List< WebElement > | findElements (String locator) |
Find elements list. More... | |
WebElement | findOptionInSelectByLabel (Select select, String label) |
Find option in select by label web element. More... | |
WebElement | findOptionInSelectByValue (Select select, String value) |
Find option in select by value web element. More... | |
Select | findSelect (String locator) |
Find select select. More... | |
String | getAllCookies () |
Gets all cookies for the current website and returns them as a string. More... | |
String | getAttribute (String locator, String attribute) |
Returns the value of an attribute at a specific locator. More... | |
String | getCssValue (String locator, String style) |
Returns the CSS value at a specific locator. More... | |
String | getCurrentUrl () |
Gets current url. More... | |
String | getOptionSelected (String locator) |
Returns the selected label of the select box. More... | |
String | getPageDebugInformation () |
Gets page debug information. More... | |
String | getSupportedXPathVersion () |
Gets supported x path version. More... | |
String | getTitle () |
Gets title. More... | |
String | getWindowHandle () |
Returns the current windowhandle. More... | |
String | getWorkingDir () |
Gets working dir. More... | |
WebDriver | giveWebDriver () |
Returns the currect webdriver for use in other fixture. More... | |
boolean | isElementEnabled (String locator) |
Is element enabled boolean. More... | |
boolean | isElementVisible (String locator) |
Checks if the element is visible. More... | |
Properties | loadPropertiesFromFiles (String configuration) |
Loads the specified properties into memory, supports multiple properties files if they are comma-separated. More... | |
void | logPageSource () |
Log page source. More... | |
void | logProperties (Properties properties) |
Log properties. More... | |
void | logThis (String input) |
Log this. More... | |
void | makeChecked (String locator) |
Checks a checkbox (or radiobutton), if it was checked then nothing will be done. More... | |
void | makeNotChecked (String locator) |
Unchecks a checkbox (or radiobutton), if it was checked then nothing will be done. More... | |
void | maximizeWindow () |
Maximizes the window. More... | |
void | moveWindow (int horizontal, int vertical) |
Moves the window. More... | |
void | openWebsite (String url) |
Open a new window with the given url More... | |
void | pause (String milliseconds) |
Pause is not allowed anymore. More... | |
void | refreshWebsite () |
Refreshes the current web site. More... | |
void | resetLoopCommands () |
Reset loop commands. More... | |
void | resizeWindow (int pixelsWidth, int pixelsHeight) |
Resizes the window to the specified dimensions. More... | |
void | restoreSelenium3Limitations () |
void | runLoop (int numberOfTimes, int timeBetweenLoopsInMillis) |
Run loop. More... | |
void | runLoopCommandIfElementIsPresent (String locator) |
Run loop command if element is present. More... | |
boolean | runLoopUntilElementPresent (String locator, int maxTimesToLoop, int timeBetweenLoopsInMillis) |
Run loop until element present boolean. More... | |
boolean | runLoopUntilJavascriptReturnValue (String javascript, String expectedExpressionReturnValue, int maxTimesToLoop, int timeBetweenLoopsInMillis) |
Run loop until javascript return value boolean. More... | |
void | scrollDownTo (String locator) |
Scrolls down to the element using the locator. More... | |
void | scrollTo (String locator) |
Scroll to. More... | |
void | scrollUpTo (String locator) |
Scrolls up to the element using the locator. More... | |
boolean | select (String locator, String value) |
Selects an option in a select box using the specified value. More... | |
void | selectAllOptions (String locator) |
Selects all options in a select. More... | |
void | selectAndWait (String locator, String value) |
Selects an option in a select box using the specified value to trigger a page load. More... | |
boolean | selectUsingLabel (String locator, String label) |
Selects an option in a select box using the specified label. More... | |
void | selectUsingLabel (String locator, String label, String keywordAllow) |
Select using label. More... | |
void | selectUsingLabelIfElementPresent (String locator, String label) |
Selects the specified value if the element is present. More... | |
void | setCookieForThisDomain (String name, String value) |
Sets a cookie for the curent domain and path with specified name and value. More... | |
void | setDownloadPath (String path) |
Sets download path. More... | |
void | setDownloadProxy (String proxyHost, int proxyport) |
Sets download proxy. More... | |
void | setDownloadProxyBasicCredentials (String username, String password) |
Sets download proxy basic credentials. More... | |
void | setDownloadProxyNtlmCredentials (String username, String password, String workstation, String domain) |
Sets download proxy ntlm credentials. More... | |
void | setLoopCommand (String command) |
Sets loop command. More... | |
void | setLoopCommand (String command, String target) |
Sets loop command. More... | |
void | setLoopCommand (String command, String target, String value) |
Sets loop command. More... | |
void | setLoopCommand (String command, String target, String value, String param) |
Sets loop command. More... | |
void | setWindowPosition (int x, int y) |
Sets the window position. More... | |
void | sleep (long millis) |
Performs a pause action using the Actions class. More... | |
void | switchToFrameUsingIndex (int index) |
Switch to frame using index. More... | |
void | switchToFrameUsingLocator (String locator) |
Pushes a new frame as the current driver. More... | |
void | switchToStart () |
Go back to the initial state. More... | |
void | switchToUnfocussedWindow () |
Switches to the opened window that is not the curent window for webdriver. More... | |
void | switchToWindow (String nameOrHandle) |
Pushes a new window as the current driver. More... | |
void | switchToWindowByTitle (String pattern) |
Pushes a new window as the current driver using the window title or a regexp as input Will retrieve all window handles and switch between them. More... | |
void | tab (String locator) |
Tab out of the element found using the locator. More... | |
String | takeScreenshot () throws IOException |
Takes a screenshot using Selenium.TakesScreenshot. More... | |
void | type (String locator, String value) |
Writes the specified value to the element found using the locator. More... | |
void | typeIfElementPresent (String locator, String value) |
Types the specified value if the element is present. More... | |
void | typeKeyCodeUsingActions (Keys keycode) |
Type key code using actions. More... | |
void | typeKeyCodeWithoutClear (String locator, Keys keycode) |
Type key code without clear. More... | |
void | typeUsingJavascript (String locator, String value) |
Types a value in an element on the page using Javascript. More... | |
void | typeWithClear (String locator, String value) |
Writes the specified value to the element found using the locator. More... | |
void | typeWithoutClear (String locator, String value) |
Type without clear. More... | |
void | uploadFile (final String locator, final String fileName) |
Method to send inut to a INPUT element with TYPE="FILE". More... | |
void | uploadFile (final String locator, String fileLocation, String fileName) |
Upload file. More... | |
boolean | verifyAllOptionsNotSelected (String locator) |
Verifies if all the options in a select box are not selected. More... | |
boolean | verifyAllOptionsSelected (String locator) |
Verifies if all the options in a select box are selected. More... | |
Boolean | verifyAttributePresent (String locator, String attribute) |
Verify attribute present boolean. More... | |
Boolean | verifyAttributeValue (String locator, String attribute, String pattern) |
Verify attribute value boolean. More... | |
boolean | verifyElementNotPresent (String locator) |
Check that the element is not present. More... | |
boolean | verifyElementPresent (String locator) |
Check that the element is present. More... | |
boolean | verifyOptionNotSelected (String locator, String value) |
Verifies if an option in a select box is not selected. More... | |
boolean | verifyOptionNotSelectedByLabel (String locator, String label) |
Verifies if an option in a select box is not selected. More... | |
boolean | verifyOptionSelected (String locator, String value) |
Verifies if an option in a select box is selected. More... | |
boolean | verifyOptionSelectedByLabel (String locator, String label) |
Verifies if an option in a select box is selected. More... | |
boolean | verifyPatternPresent (String pattern) |
Verify pattern present boolean. More... | |
Boolean | verifyTextContainsString (String locator, String pattern) |
Verifies that a specific String is present in a specific part of the page. More... | |
boolean | verifyTextNotPresent (String text) |
Verifies if the given text is not present anywhere in the source of the page. More... | |
boolean | verifyTextPresent (String text) |
Verifies if the given text is present anywhere in the source of the page. More... | |
boolean | verifyTimesElementPresent (String locator, int timesPresent) |
Verifies that a specific element is x times present on the page. More... | |
boolean | verifyValueEmpty (String locator) |
Checks whether a value is empty. More... | |
boolean | verifyValueNotEmpty (String locator) |
Checks whether a value is not empty. More... | |
boolean | verifyValueOfCookie (String name, String value) |
Verifies the value of a cookie with the specified name using the supplied expected value More... | |
void | waitForAlertAndAccept () |
Wait for an alert dialog and when it appears it will accept it. More... | |
void | waitForAlertAndDismiss () |
Wait for an alert dialog and when it appears it will dismiss it. More... | |
void | waitForEditable (String locator) |
Waits for an element to become editable. More... | |
boolean | waitForElementNotPresent (String locator) |
Returns true if the element is not present, otherwise Waits for an element to become detached from the dom tree. More... | |
boolean | waitForElementPresent (String locator) |
Waits for an element to become present in the dom tree. More... | |
void | waitForElementToBeClickable (String locator) |
Wait for element to be clickable. More... | |
void | waitForNotEditable (String locator) |
Waits for an element to become not editable. More... | |
boolean | waitForNotText (String locator, String text) |
Waits for the specified text to be removed / adjusted. More... | |
void | waitForNotVisible (String locator) |
Waits for an element to become invisible (meaning visible and width and height != 0). More... | |
void | waitForPageLoad () |
Deprecated command, should wait for the page to load but is now implicit. More... | |
void | waitForPossibleAlertAndAccept () |
Wait for an alert dialog and when it appears it will accept it. More... | |
void | waitForPossibleAlertAndDismiss () |
Wait for an alert dialog and when it appears it will dismiss it. More... | |
void | waitForSeconds (String milliseconds) |
Pause is not allowed anymore. More... | |
boolean | waitForText (String locator, String text) |
Waits for the text to become visible in the specified locator. More... | |
boolean | waitForTextNotPresent (String text) |
Waits for the text to become absent anywhere on the page. More... | |
boolean | waitForTextPresent (String text) |
Waits for the text to become visible anywhere on the page. More... | |
boolean | waitForValue (String locator, String value) |
Waits for the text to become absent anywhere on the page. More... | |
boolean | waitForValueNotEmpty (String locator) |
Waits for the element to have a value. More... | |
void | waitForVisible (String locator) |
Waits for an element to become visible (meaning visible and width and height != 0). More... | |
Getting Data From A Page | |
The following methods are used to get data from a webpage | |
String | getText (String locator) |
Returns the text that is present in the specified locator. More... | |
String | getValue (String locator) |
Returns the value that is present in the specified locator. More... | |
Verifying Data On A Page | |
The following methods are used to verify data on a webpage | |
boolean | verifyText (String locator, String pattern) |
Verifies if the text at the specified locator is compliant with the given pattern. More... | |
boolean | verifyValue (String locator, String pattern) |
Verifies if the text at the specified locator is compliant with the given pattern. More... | |
Static Public Member Functions | |
static ExpectedCondition< Boolean > | elementNotEmpty (final String locator) |
Condition to check if the text is present anywhere on the page. More... | |
static String | getValueElement (WebElement element) |
Get the actual value of an element, for checkboxes and radio buttons it will return true or false . More... | |
static void | takeScreenshotOnException (boolean TAKESCREENSHOTONEXCEPTION) |
Take screenshot on exception. More... | |
static ExpectedCondition< Boolean > | textToBePresent (final String pattern) |
Condition to check if the text is present anywhere on the page. More... | |
static ExpectedCondition< Boolean > | valueToBePresentInElement (final String locator, final String value) |
Condition to check if the text is present anywhere on the page. More... | |
Public Attributes | |
WebDriver | driver = null |
The Driver. More... | |
Static Public Attributes | |
static final String | ATTR_TYPE = "type" |
The constant ATTR_TYPE. More... | |
static final String | ATTR_VALUE = "value" |
The constant ATTR_VALUE. More... | |
static final String | BROWSER_BROWSERSTACK = "browserstack" |
static final String | BROWSER_CHROME = "chrome" |
static final String | BROWSER_EDGE = "edge" |
static final String | BROWSER_FIREFOX = "firefox" |
static final String | BROWSER_HEADLESS = "headless" |
static final String | BROWSER_INTERNET_EXPLORER = "internet explorer" |
static final String | BROWSER_REMOTE = "remote" |
static final String | BROWSER_REMOTE_CHROME = "remote.chrome" |
static final String | BROWSER_SAFARI = "safari" |
static final String | ELEMENT_INPUT = "input" |
The constant ELEMENT_INPUT. More... | |
static final String | ELEMENT_TEXTAREA = "textarea" |
The constant ELEMENT_TEXTAREA. More... | |
static FirefoxProfile | remoteProfile |
The constant remoteProfile. More... | |
static String | SCREENSHOTLOCATION |
The constant SCREENSHOTLOCATION. More... | |
static final String | TYPE_CHECKBOX = "checkbox" |
The constant TYPE_CHECKBOX. More... | |
static final String | TYPE_RADIO = "radio" |
The constant TYPE_RADIO. More... | |
Protected Member Functions | |
SlimWebDriver () | |
Instantiate a new Slim Web Driver without configuration loading. More... | |
Static Package Functions | |
static By | constructLocatorFromString (String locator) |
Construct locator from string by. More... | |
Package Attributes | |
Keys | CtrlOrCmd = Keys.CONTROL |
The Ctrl or cmd. More... | |
Static Package Attributes | |
static String | BROWSER |
The Browser. More... | |
static float | DPR = 1 |
The Dpr. More... | |
static boolean | USEPROPERTYFILESUPPLIEDDPR = false |
The Usepropertyfilesupplieddpr. More... | |
static boolean | USEUSERSUPPLIEDDPR = false |
The Useusersupplieddpr. More... | |
static String | WEBDRIVERMANAGERPROPERTIESFILE |
The Webdrivermanagerpropertiesfile. More... | |
Private Member Functions | |
ChromeOptions | addChromeOptionsFromProperties (Properties props) |
Properties | buildProperties (String propertiesFromString, String entrySeparator) throws IOException |
void | checkIfSystemisMacOs () |
boolean | circumventSelenium3Mode () |
String | getTimeStamp () |
URL | giveRemoteServerUrl () |
WebDriver | initBrowserstackDriver (Properties properties) throws MalformedURLException |
void | initChromeDriver () throws RuntimeException |
void | initDriver (String configuration) |
Initialize the correct WebDriver for the browser specified. More... | |
void | initFirefoxDriver () |
void | initRemoteChromeDriver () |
void | initRemoteDriver () |
URL | makeUrl (String input) |
Generates a URL object, stops testing if URL is malformed. More... | |
void | quitDriverIfRequired () |
Called before a StopTestException is thrown to quit the current driver. More... | |
void | setCmdKeyifMacOs () |
Will check is the OS name starts with 'mac'. More... | |
void | setWebdriverDriverProperties (Properties properties) |
Static Private Member Functions | |
static void | initProxyForWebdriver (Properties props) |
Private Attributes | |
boolean | circumventSelenium3 = false |
Properties | properties = null |
int | seconds |
Static Private Attributes | |
static final String | HEADLESSCHROMEWINDOWSIZE = "1600x1200" |
static final String | LOCATOR_CLASSNAME = "classname=" |
static final String | LOCATOR_CSS = "css=" |
static final String | LOCATOR_ID = "id=" |
static final String | LOCATOR_LINKTEXT = "link=" |
static final String | LOCATOR_NAME = "name=" |
static final String | LOCATOR_PARTIAlLINKTEXT = "partiallink=" |
static final String | LOCATOR_XPATH = "xpath=" |
static final Logger | LOG = LoggerFactory.getLogger(SlimWebDriver.class) |
static ArrayList< WebdriverCommand > | loopCommands = new ArrayList<>() |
static final String | MAC_OS_NAME = "mac" |
static String | noproxylist |
static Proxy | proxy = null |
static String | proxyurl |
static final String | REGEX_SYNTAX = "regex:" |
static final String | REGEXPI_SYNTAX = "regexpi:" |
static boolean | SYSTEMISMACOS = false |
static boolean | TAKESCREENSHOTONEXCEPTION = false |
Deprecated: This class uses Selenium 3 to automate webpages, relies on properties files for selenium settings.
The selenium.properties file is used to define several settings:
Start the fixture by referencing one or more properties files. All property files will be combined to one Java Properties object. This way you could define some general settings (where is the selenium hub) and some project specific settings (which browser to use).
Definition at line 74 of file SlimWebDriver.java.
|
protected |
Instantiate a new Slim Web Driver without configuration loading.
Definition at line 171 of file SlimWebDriver.java.
nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.SlimWebDriver | ( | String | configuration | ) |
Instantiates a new Slim web driver.
configuration | the configuration, this is a reference to one or more selenium.properties files. If multiple files are used they must be specified in a comma-separated list |
Definition at line 184 of file SlimWebDriver.java.
|
private |
Definition at line 2745 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.browserBack | ( | ) |
Presses the browser back button.
Definition at line 747 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.browserForward | ( | ) |
Presses the browser back button.
Definition at line 754 of file SlimWebDriver.java.
|
private |
Definition at line 2772 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.checkIfCookieExists | ( | String | name | ) |
Checks if a cookie exists with the specified name
.
name | the name of the cookie. |
ConditionalException | When the cookie with the specified name does not exist. |
Definition at line 477 of file SlimWebDriver.java.
|
private |
Definition at line 2853 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.checkTimesElementPresent | ( | String | locator, |
int | timesPresent | ||
) |
Checks that a specific element is x times present on the page.
If the element is not x times present a ConditionalExceptionType is thrown.
locator | the locator |
timesPresent | the times present |
Definition at line 1478 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.checkWebsiteTitle | ( | String | title | ) |
Checks if the title of the website matches the title supplied.
title | the title of the website. |
ConditionalException | when the element can not be found or the value does not match. |
Definition at line 765 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.circumventSelenium3Limitations | ( | ) |
Definition at line 3093 of file SlimWebDriver.java.
|
private |
Definition at line 3103 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.click | ( | String | locator | ) |
Clicks on an element in the page.
locator | the locator to use to find the element. |
Definition at line 793 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.clickAndWait | ( | String | locator | ) |
Clicks on an element in the page to trigger a page load.
locator | the locator to use to find the element. |
ConditionalException | when the element can not be found. |
Definition at line 865 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.clickIfOtherElementNotPresent | ( | String | elementToClick, |
String | elementThatShoudBeAbsent | ||
) |
Click if other element not present.
elementToClick | the element to click |
elementThatShoudBeAbsent | the element that shoud be absent |
Definition at line 1418 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.clickIfOtherElementPresent | ( | String | elementToClick, |
String | elementToWaitFor | ||
) |
Click if other element present.
elementToClick | the element to click |
elementToWaitFor | the element to wait for |
Definition at line 1398 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.clickUntilElementPresent | ( | String | elementToClick, |
String | elementToWaitFor, | ||
long | commandTimeout, | ||
int | maxAttempts | ||
) |
Mag nog mooier.
Clicks on an element until a different element becomes present
elementToClick | the element to click |
elementToWaitFor | the element to wait for |
commandTimeout | - alternative command timeout for this command, needs to be set |
maxAttempts | the max attempts |
Definition at line 1373 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.clickUpToTimes | ( | String | locator, |
String | numberOfTimesToExecute | ||
) |
Clicks on an element in the page for a certain number of times.
locator | the locator to use to find the element. |
numberOfTimesToExecute | the number of times to click the element. |
ConditionalException | when the element can not be found. Ronald: DONE |
Definition at line 876 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.clickUsingAction | ( | String | locator | ) |
Click using action.
locator | the locator |
Definition at line 815 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.clickUsingJavascript | ( | String | locator | ) |
Clicks on an element in the page that is not visible i.e.
hidden
locator | the locator |
Definition at line 826 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.closeWebsite | ( | ) |
Quit the browser.
Definition at line 606 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.closeWindow | ( | ) |
Close the current window.
Definition at line 613 of file SlimWebDriver.java.
|
staticpackage |
Construct locator from string by.
locator | the locator |
Definition at line 297 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.contextClick | ( | String | locator | ) |
Richt click / context click action.
locator | the locator |
ConditionalException | when the element can not be found |
Definition at line 839 of file SlimWebDriver.java.
int nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.countTimesElementPresent | ( | String | locator | ) |
Counts the number of times an element is present on the page.
locator | the locator |
Definition at line 1456 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.defaultCommandTimeout | ( | int | seconds | ) |
Register the default timeout that will apply to all commands.
seconds | the amount of seconds to wait until the test fails. |
ConditionalException | when the specified seconds is a negative number. |
Definition at line 419 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.defaultPageLoadTimeout | ( | int | seconds | ) |
Register the default timeout that will apply to page loading actions.
seconds | the amount of seconds to wait until the page loads |
ConditionalException | when the specified seconds is a negative number. |
Definition at line 435 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.deleteAllCookies | ( | ) |
Deletes all cookies.
Definition at line 455 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.deleteCookieByName | ( | String | name | ) |
Delete the cookie with the specified name.
name | the name of the cookie. |
Definition at line 465 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.deselect | ( | String | locator, |
String | value | ||
) |
Deselects an option in a select box using the specified value.
locator | the locator to use to find the element. |
value | the value of the option within the select box. |
ConditionalException | when the element could not be found, is not an SELECT element, there is no option with the specified value or when the option was not selected in the first place. |
Definition at line 2002 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.deselectAllOptions | ( | String | locator | ) |
Deselects all options in a select box.
locator | the locator to use to find the element. |
ConditionalException | when the element could not be found. |
Definition at line 2036 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.deselectUsingLabel | ( | String | locator, |
String | label | ||
) |
Deselects an option in a select box using the specified label.
locator | the locator to use to find the element. |
label | the label of the option within the select box. |
ConditionalException | when the element could not be found, is not an SELECT element, there is no option with the specified label or when the option was not selected in the first place. |
Definition at line 1953 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.disableTextbox | ( | String | locator | ) |
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.doubleClick | ( | String | locator | ) |
Doubleclicks on an element in the page.
locator | the locator to use to find the element |
ConditionalException | when the element can not be found Pascal: DONE |
Definition at line 852 of file SlimWebDriver.java.
String nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.downloadFile | ( | String | locator, |
String | filename | ||
) | throws Exception |
Download a file from a locator using the selenium session (cookies, login state, etc..) and save it in the java TEMP folder using the specified name.
This method resolves the 'href' attribute of the locator and downloads the file
locator | the locator |
filename | the filename |
Exception | the exception |
Definition at line 2955 of file SlimWebDriver.java.
String nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.downloadImage | ( | String | locator, |
String | filename | ||
) | throws Exception |
Download an image from a locator using the selenium session (cookies, login state, etc..) and save it in the java TEMP folder using the specified name.
This method resolves the 'src' attribute of the locator and downloads the image
locator | the locator |
filename | the filename |
Exception | the exception |
Definition at line 2983 of file SlimWebDriver.java.
String nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.downloadUrl | ( | String | url, |
String | filename | ||
) |
Download a file from a URL using the selenium session (cookies, login state, etc..) and save it in the java TEMP folder using the specified name.
url | |
filename |
Definition at line 2968 of file SlimWebDriver.java.
|
static |
Condition to check if the text is present anywhere on the page.
locator | the locator to use to find the element. |
Definition at line 233 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.enableTextbox | ( | String | locator | ) |
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.executeJavaScript | ( | String | script | ) |
Executes the specified javascript in the browser.
script | the javascript to execute. |
ConditionalException | when the javascript failed to execute. |
Definition at line 1665 of file SlimWebDriver.java.
String nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.executeJavaScriptWithReturnValue | ( | String | script | ) |
Execute java script with return value string.
script | the script |
Definition at line 1681 of file SlimWebDriver.java.
WebElement nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.findElement | ( | String | locator | ) |
Find element web element.
locator | the locator |
Definition at line 2425 of file SlimWebDriver.java.
List< WebElement > nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.findElements | ( | String | locator | ) |
Find elements list.
locator | the locator |
Definition at line 2439 of file SlimWebDriver.java.
WebElement nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.findOptionInSelectByLabel | ( | Select | select, |
String | label | ||
) |
Find option in select by label web element.
select | the select |
label | the label |
Definition at line 2394 of file SlimWebDriver.java.
WebElement nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.findOptionInSelectByValue | ( | Select | select, |
String | value | ||
) |
Find option in select by value web element.
select | the select |
value | the value |
Definition at line 2410 of file SlimWebDriver.java.
Select nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.findSelect | ( | String | locator | ) |
Find select select.
locator | the locator |
Definition at line 2377 of file SlimWebDriver.java.
String nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.getAllCookies | ( | ) |
Gets all cookies for the current website and returns them as a string.
Definition at line 448 of file SlimWebDriver.java.
String nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.getAttribute | ( | String | locator, |
String | attribute | ||
) |
Returns the value of an attribute at a specific locator.
locator | the locator to find the element on the page. |
attribute | the name of the attribute. |
Definition at line 1194 of file SlimWebDriver.java.
String nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.getCssValue | ( | String | locator, |
String | style | ||
) |
Returns the CSS value at a specific locator.
locator | the locator to find the element on the page. |
style | the css style to check, e.g. color, background-color, font-size. |
Definition at line 1206 of file SlimWebDriver.java.
String nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.getCurrentUrl | ( | ) |
String nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.getOptionSelected | ( | String | locator | ) |
Returns the selected label of the select box.
locator | the locator to use to find the element. |
Definition at line 2096 of file SlimWebDriver.java.
String nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.getPageDebugInformation | ( | ) |
Gets page debug information.
Definition at line 382 of file SlimWebDriver.java.
String nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.getSupportedXPathVersion | ( | ) |
Gets supported x path version.
Definition at line 2886 of file SlimWebDriver.java.
String nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.getText | ( | String | locator | ) |
Returns the text that is present in the specified locator.
locator | the locator to use to find the element. |
Definition at line 1126 of file SlimWebDriver.java.
|
private |
Definition at line 2989 of file SlimWebDriver.java.
String nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.getTitle | ( | ) |
String nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.getValue | ( | String | locator | ) |
Returns the value that is present in the specified locator.
locator | the locator to find the element |
Definition at line 1138 of file SlimWebDriver.java.
|
static |
Get the actual value of an element, for checkboxes and radio buttons it will return true
or false
.
element | the element |
Definition at line 326 of file SlimWebDriver.java.
String nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.getWindowHandle | ( | ) |
Returns the current windowhandle.
Definition at line 727 of file SlimWebDriver.java.
String nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.getWorkingDir | ( | ) |
|
private |
Definition at line 2765 of file SlimWebDriver.java.
WebDriver nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.giveWebDriver | ( | ) |
Returns the currect webdriver for use in other fixture.
Definition at line 196 of file SlimWebDriver.java.
|
private |
Definition at line 2716 of file SlimWebDriver.java.
|
private |
Definition at line 2619 of file SlimWebDriver.java.
|
private |
Initialize the correct WebDriver for the browser specified.
configuration | the configuration to use. |
Definition at line 2571 of file SlimWebDriver.java.
|
private |
Definition at line 2689 of file SlimWebDriver.java.
|
staticprivate |
Definition at line 346 of file SlimWebDriver.java.
|
private |
Definition at line 2645 of file SlimWebDriver.java.
|
private |
Definition at line 2667 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.isElementEnabled | ( | String | locator | ) |
Is element enabled boolean.
locator | the locator |
Definition at line 1558 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.isElementVisible | ( | String | locator | ) |
Checks if the element is visible.
locator | the locator |
ConditionalException | when the element was not visible. |
Definition at line 1544 of file SlimWebDriver.java.
Properties nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.loadPropertiesFromFiles | ( | String | configuration | ) |
Loads the specified properties into memory, supports multiple properties files if they are comma-separated.
configuration | single or multiple properties files, if multiple then comma-separated |
Definition at line 2508 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.logPageSource | ( | ) |
Log page source.
Definition at line 361 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.logProperties | ( | Properties | properties | ) |
Log properties.
properties | the properties |
Definition at line 2555 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.logThis | ( | String | input | ) |
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.makeChecked | ( | String | locator | ) |
Checks a checkbox (or radiobutton), if it was checked then nothing will be done.
locator | the locator to use to find the element. |
Definition at line 903 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.makeNotChecked | ( | String | locator | ) |
Unchecks a checkbox (or radiobutton), if it was checked then nothing will be done.
locator | the locator to use to find the element. |
Definition at line 926 of file SlimWebDriver.java.
|
private |
Generates a URL object, stops testing if URL is malformed.
input | string |
StopTestCommandException | if URL is malformed |
Definition at line 2871 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.maximizeWindow | ( | ) |
Maximizes the window.
Definition at line 562 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.moveWindow | ( | int | horizontal, |
int | vertical | ||
) |
Moves the window.
horizontal | shift in pixels |
vertical | shift in pixels |
Definition at line 583 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.openWebsite | ( | String | url | ) |
Open a new window with the given url
url | the url to call upon opening the new window. |
ConditionalException | when the specified URL is not valid. |
Definition at line 531 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.pause | ( | String | milliseconds | ) |
Pause is not allowed anymore.
milliseconds | the milliseconds |
Definition at line 777 of file SlimWebDriver.java.
|
private |
Called before a StopTestException is thrown to quit the current driver.
Definition at line 2838 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.refreshWebsite | ( | ) |
Refreshes the current web site.
Definition at line 740 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.resetLoopCommands | ( | ) |
Reset loop commands.
Definition at line 2262 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.resizeWindow | ( | int | pixelsWidth, |
int | pixelsHeight | ||
) |
Resizes the window to the specified dimensions.
pixelsWidth | the pixels width |
pixelsHeight | the pixels height |
Definition at line 572 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.restoreSelenium3Limitations | ( | ) |
Definition at line 3098 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.runLoop | ( | int | numberOfTimes, |
int | timeBetweenLoopsInMillis | ||
) |
Run loop.
numberOfTimes | the number of times |
timeBetweenLoopsInMillis | the time between loops in millis |
Definition at line 2272 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.runLoopCommandIfElementIsPresent | ( | String | locator | ) |
Run loop command if element is present.
locator | the locator |
Definition at line 2290 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.runLoopUntilElementPresent | ( | String | locator, |
int | maxTimesToLoop, | ||
int | timeBetweenLoopsInMillis | ||
) |
Run loop until element present boolean.
locator | the locator |
maxTimesToLoop | the max times to loop |
timeBetweenLoopsInMillis | the time between loops in millis |
Definition at line 2306 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.runLoopUntilJavascriptReturnValue | ( | String | javascript, |
String | expectedExpressionReturnValue, | ||
int | maxTimesToLoop, | ||
int | timeBetweenLoopsInMillis | ||
) |
Run loop until javascript return value boolean.
javascript | the javascript |
expectedExpressionReturnValue | the expected expression return value |
maxTimesToLoop | the max times to loop |
timeBetweenLoopsInMillis | the time between loops in millis |
Definition at line 2331 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.scrollDownTo | ( | String | locator | ) |
Scrolls down to the element using the locator.
locator | the locator to use to find the element. |
Definition at line 1007 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.scrollTo | ( | String | locator | ) |
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.scrollUpTo | ( | String | locator | ) |
Scrolls up to the element using the locator.
locator | the locator to use to find the element. |
Definition at line 996 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.select | ( | String | locator, |
String | value | ||
) |
Selects an option in a select box using the specified value.
locator | the locator to use to find the element. |
value | the value of the option within the select box. |
ConditionalException | when the element could not be found, is not an SELECT element, there is no option with the specified value. |
Definition at line 1972 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.selectAllOptions | ( | String | locator | ) |
Selects all options in a select.
locator | the locator to use to find the element. |
ConditionalException | when the element could not be found or when the element is not an SELECT element. |
Definition at line 2019 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.selectAndWait | ( | String | locator, |
String | value | ||
) |
Selects an option in a select box using the specified value to trigger a page load.
locator | the locator to use to find the element. |
value | the value of the option within the select box. |
ConditionalException | when the element could not be found, is not an SELECT element, there is no option with the specified value. |
Definition at line 1991 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.selectUsingLabel | ( | String | locator, |
String | label | ||
) |
Selects an option in a select box using the specified label.
locator | the locator to use to find the element. |
label | the label of the option within the select box. |
ConditionalException | when the element could not be found, is not an SELECT element, there is no option with the specified label. |
Definition at line 1887 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.selectUsingLabel | ( | String | locator, |
String | label, | ||
String | keywordAllow | ||
) |
Select using label.
locator | the locator |
label | the label |
keywordAllow | the keyword allow |
Definition at line 1907 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.selectUsingLabelIfElementPresent | ( | String | locator, |
String | label | ||
) |
Selects the specified value if the element is present.
Can not be used as a test condition - returntype is void. Method will catch all exceptions Use in the test preparation steps.
locator | the locator |
label | the label |
Definition at line 1931 of file SlimWebDriver.java.
|
private |
Will check is the OS name starts with 'mac'.
If this is the case the COMMAND key will be used instead of the CONTROL key if 'CtrlOrCmd' is used.
Definition at line 2847 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.setCookieForThisDomain | ( | String | name, |
String | value | ||
) |
Sets a cookie for the curent domain and path with specified name and value.
name | the name of the cookie. |
value | the value of the cookie. |
Definition at line 519 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.setDownloadPath | ( | String | path | ) |
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.setDownloadProxy | ( | String | proxyHost, |
int | proxyport | ||
) |
Sets download proxy.
proxyHost | the proxy host |
proxyport | the proxyport |
Definition at line 2915 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.setDownloadProxyBasicCredentials | ( | String | username, |
String | password | ||
) |
Sets download proxy basic credentials.
username | the username |
password | the password |
Definition at line 2926 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.setDownloadProxyNtlmCredentials | ( | String | username, |
String | password, | ||
String | workstation, | ||
String | domain | ||
) |
Sets download proxy ntlm credentials.
username | the username |
password | the password |
workstation | the workstation |
domain | the domain |
Definition at line 2939 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.setLoopCommand | ( | String | command | ) |
Sets loop command.
command | the command |
Definition at line 2218 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.setLoopCommand | ( | String | command, |
String | target | ||
) |
Sets loop command.
command | the command |
target | the target |
Definition at line 2228 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.setLoopCommand | ( | String | command, |
String | target, | ||
String | value | ||
) |
Sets loop command.
command | the command |
target | the target |
value | the value |
Definition at line 2239 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.setLoopCommand | ( | String | command, |
String | target, | ||
String | value, | ||
String | param | ||
) |
Sets loop command.
command | the command |
target | the target |
value | the value |
param | the param |
Definition at line 2251 of file SlimWebDriver.java.
|
private |
Definition at line 2779 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.setWindowPosition | ( | int | x, |
int | y | ||
) |
Sets the window position.
x | the x |
y | the y |
Definition at line 599 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.sleep | ( | long | millis | ) |
Performs a pause action using the Actions class.
millis | the time to pause in milliseconds meer informatie http://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/interactions/Actions.html let op gebruik alleen als het echt nodig is of voor de debug van je fitnesse test. |
Definition at line 890 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.switchToFrameUsingIndex | ( | int | index | ) |
Switch to frame using index.
index | the index |
Definition at line 635 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.switchToFrameUsingLocator | ( | String | locator | ) |
Pushes a new frame as the current driver.
locator | the locator to use to find the web element. |
Definition at line 622 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.switchToStart | ( | ) |
Go back to the initial state.
Definition at line 647 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.switchToUnfocussedWindow | ( | ) |
Switches to the opened window that is not the curent window for webdriver.
Definition at line 712 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.switchToWindow | ( | String | nameOrHandle | ) |
Pushes a new window as the current driver.
nameOrHandle | the name or id attribute. |
Definition at line 656 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.switchToWindowByTitle | ( | String | pattern | ) |
Pushes a new window as the current driver using the window title or a regexp as input Will retrieve all window handles and switch between them.
If the title of the window is found we stop. Otherwise switch back to the original window
pattern | the expected window title (optionally witg REGEXPI: prefix) |
Definition at line 670 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.tab | ( | String | locator | ) |
Tab out of the element found using the locator.
locator | the locator to use to find the element |
ConditionalException | when the element can not be found |
Definition at line 986 of file SlimWebDriver.java.
String nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.takeScreenshot | ( | ) | throws IOException |
Takes a screenshot using Selenium.TakesScreenshot.
IOException | the io exception |
Definition at line 2170 of file SlimWebDriver.java.
|
static |
Take screenshot on exception.
TAKESCREENSHOTONEXCEPTION | the takescreenshotonexception |
Definition at line 287 of file SlimWebDriver.java.
|
static |
Condition to check if the text is present anywhere on the page.
pattern | the regular expression to search for. |
Definition at line 206 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.type | ( | String | locator, |
String | value | ||
) |
Writes the specified value to the element found using the locator.
Will select text in the element first and type over it.
locator | the locator to use to find the element. |
value | the value to write to the element. |
ConditionalException | when the element can not be found or is not an INPUT or TEXTAREA element. |
Definition at line 951 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.typeIfElementPresent | ( | String | locator, |
String | value | ||
) |
Types the specified value if the element is present.
Can not be used as a test condition - returntype is void. Method will catch all exceptions Use in the test preparation steps.
locator | the locator |
value | the value |
Definition at line 1057 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.typeKeyCodeUsingActions | ( | Keys | keycode | ) |
Type key code using actions.
keycode | the keycode |
Definition at line 1110 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.typeKeyCodeWithoutClear | ( | String | locator, |
Keys | keycode | ||
) |
Type key code without clear.
locator | the locator |
keycode | the keycode |
Definition at line 1094 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.typeUsingJavascript | ( | String | locator, |
String | value | ||
) |
Types a value in an element on the page using Javascript.
locator | the locator |
value | the text to be typed |
Definition at line 973 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.typeWithClear | ( | String | locator, |
String | value | ||
) |
Writes the specified value to the element found using the locator.
locator | the locator to use to find the element. |
value | the value to write to the element. |
ConditionalException | when the element can not be found or is not an INPUT or TEXTAREA element. |
Definition at line 1039 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.typeWithoutClear | ( | String | locator, |
String | value | ||
) |
Type without clear.
locator | the locator |
value | the value |
Definition at line 1077 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.uploadFile | ( | final String | locator, |
final String | fileName | ||
) |
Method to send inut to a INPUT element with TYPE="FILE".
If a RemoteWebdriver is used the file will be streamed to the selenium node. If a local Webdriver is used this command will type the filename in the input field.
locator | the locator |
fileName | the file name |
Definition at line 2460 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.uploadFile | ( | final String | locator, |
String | fileLocation, | ||
String | fileName | ||
) |
Upload file.
locator | the locator |
fileLocation | the file location |
fileName | the file name |
Definition at line 2486 of file SlimWebDriver.java.
|
static |
Condition to check if the text is present anywhere on the page.
locator | the locator to use to find the element. |
value | the value to look for. |
Definition at line 261 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyAllOptionsNotSelected | ( | String | locator | ) |
Verifies if all the options in a select box are not selected.
locator | the locator to use to find the element. |
Definition at line 2148 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyAllOptionsSelected | ( | String | locator | ) |
Verifies if all the options in a select box are selected.
locator | the locator to use to find the element. |
Definition at line 2126 of file SlimWebDriver.java.
Boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyAttributePresent | ( | String | locator, |
String | attribute | ||
) |
Verify attribute present boolean.
locator | the locator |
attribute | the attribute |
Definition at line 1218 of file SlimWebDriver.java.
Boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyAttributeValue | ( | String | locator, |
String | attribute, | ||
String | pattern | ||
) |
Verify attribute value boolean.
locator | the locator |
attribute | the attribute |
pattern | the pattern |
Definition at line 1240 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyElementNotPresent | ( | String | locator | ) |
Check that the element is not present.
locator | the locator to find the element. |
Definition at line 1430 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyElementPresent | ( | String | locator | ) |
Check that the element is present.
locator | the locator |
Definition at line 1440 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyOptionNotSelected | ( | String | locator, |
String | value | ||
) |
Verifies if an option in a select box is not selected.
locator | the locator to use to find the element. |
value | the value |
Definition at line 2065 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyOptionNotSelectedByLabel | ( | String | locator, |
String | label | ||
) |
Verifies if an option in a select box is not selected.
locator | the locator to use to find the element. |
label | the label |
Definition at line 2111 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyOptionSelected | ( | String | locator, |
String | value | ||
) |
Verifies if an option in a select box is selected.
locator | the locator to use to find the element. |
value | the value |
Definition at line 2049 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyOptionSelectedByLabel | ( | String | locator, |
String | label | ||
) |
Verifies if an option in a select box is selected.
locator | the locator to use to find the element. |
label | the label of the option. |
Definition at line 2081 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyPatternPresent | ( | String | pattern | ) |
Verify pattern present boolean.
pattern | the pattern |
Definition at line 1263 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyText | ( | String | locator, |
String | pattern | ||
) |
Verifies if the text at the specified locator is compliant with the given pattern.
If the locator refers to an input element it will check if it is a checkbox or radio button, if so it will use "true" or "false", if it is any other input element it will use the value of the attribute "value".
locator | the locator to use to find the element. |
pattern | the pattern. |
Definition at line 1162 of file SlimWebDriver.java.
Boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyTextContainsString | ( | String | locator, |
String | pattern | ||
) |
Verifies that a specific String is present in a specific part of the page.
locator | the locator |
pattern | the pattern |
Definition at line 1284 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyTextNotPresent | ( | String | text | ) |
Verifies if the given text is not present anywhere in the source of the page.
text | the value to verify. |
Definition at line 1273 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyTextPresent | ( | String | text | ) |
Verifies if the given text is present anywhere in the source of the page.
text | the value to verify. |
Definition at line 1253 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyTimesElementPresent | ( | String | locator, |
int | timesPresent | ||
) |
Verifies that a specific element is x times present on the page.
locator | the locator |
timesPresent | the times present |
Definition at line 1467 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyValue | ( | String | locator, |
String | pattern | ||
) |
Verifies if the text at the specified locator is compliant with the given pattern.
If the locator refers to an input element it will check if it is a checkbox or radio button, if so it will use "true" or "false", if it is any other input element it will use the value of the attribute "value".
locator | the locator to use to find the element. |
pattern | the pattern. |
Definition at line 1178 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyValueEmpty | ( | String | locator | ) |
Checks whether a value is empty.
locator | the locator |
Definition at line 1865 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyValueNotEmpty | ( | String | locator | ) |
Checks whether a value is not empty.
locator | the locator |
Definition at line 1875 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.verifyValueOfCookie | ( | String | name, |
String | value | ||
) |
Verifies the value of a cookie with the specified name
using the supplied expected value
name | the name of the cookie. |
value | the expexted value |
ConditionalException | When the cookie with the specified name does not exist. |
ConditionalException | When the cookie with the specified name does not have the specified value. |
Definition at line 500 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.waitForAlertAndAccept | ( | ) |
Wait for an alert dialog and when it appears it will accept it.
ConditionalException | when a timeout occurs, a webdriver exception occurs or when the dialog is not appearing. |
Definition at line 1592 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.waitForAlertAndDismiss | ( | ) |
Wait for an alert dialog and when it appears it will dismiss it.
ConditionalException | when a timeout occurs, a webdriver exception occurs or when the dialog is not appearing. |
Definition at line 1629 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.waitForEditable | ( | String | locator | ) |
Waits for an element to become editable.
locator | the locator to use to find the element. |
ConditionalException | when the element was not found or the element did not become editable. |
Definition at line 1296 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.waitForElementNotPresent | ( | String | locator | ) |
Returns true if the element is not present, otherwise Waits for an element to become detached from the dom tree.
locator | the locator to use to find the element. |
ConditionalException | when the element was not found or the element did not detach itself from the dom tree. |
Definition at line 1493 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.waitForElementPresent | ( | String | locator | ) |
Waits for an element to become present in the dom tree.
Will also return true if the element was already present.
locator | the locator to use to find the element. |
ConditionalException | when the element was not found or the element did not appear in the dom tree. |
Definition at line 1345 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.waitForElementToBeClickable | ( | String | locator | ) |
Wait for element to be clickable.
locator | the locator |
Definition at line 1571 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.waitForNotEditable | ( | String | locator | ) |
Waits for an element to become not editable.
locator | the locator to use to find the element. |
ConditionalException | when the element was not found or the element did not become un-editable. |
Definition at line 1320 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.waitForNotText | ( | String | locator, |
String | text | ||
) |
Waits for the specified text to be removed / adjusted.
locator | the locator to use to find the element. |
text | the text to search for. |
ConditionalException | when the text did not change. |
Definition at line 1792 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.waitForNotVisible | ( | String | locator | ) |
Waits for an element to become invisible (meaning visible and width and height != 0).
locator | the locator to use to find the element. |
ConditionalException | when the element was not found or the element did not become visible. |
Definition at line 1692 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.waitForPageLoad | ( | ) |
Deprecated command, should wait for the page to load but is now implicit.
Definition at line 734 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.waitForPossibleAlertAndAccept | ( | ) |
Wait for an alert dialog and when it appears it will accept it.
If it doesn't appear in the wait time of 2 seconds, we continue
ConditionalException | when a timeout occurs, a webdriver exception occurs or when the dialog is not appearing. |
Definition at line 1611 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.waitForPossibleAlertAndDismiss | ( | ) |
Wait for an alert dialog and when it appears it will dismiss it.
If it doesn't appear in the wait time of 2 seconds, we continue
ConditionalException | when a timeout occurs, a webdriver exception occurs or when the dialog is not appearing. |
Definition at line 1647 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.waitForSeconds | ( | String | milliseconds | ) |
Pause is not allowed anymore.
milliseconds | the milliseconds |
Definition at line 785 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.waitForText | ( | String | locator, |
String | text | ||
) |
Waits for the text to become visible in the specified locator.
locator | the locator to use to find the element. |
text | the text to search for. |
ConditionalException | when the text did not become visible. |
Definition at line 1766 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.waitForTextNotPresent | ( | String | text | ) |
Waits for the text to become absent anywhere on the page.
text | the text to search for. |
ConditionalException | when the text did not become visible. |
Definition at line 1741 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.waitForTextPresent | ( | String | text | ) |
Waits for the text to become visible anywhere on the page.
text | the text to search for. |
ConditionalException | when the text did not become visible. |
Definition at line 1717 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.waitForValue | ( | String | locator, |
String | value | ||
) |
Waits for the text to become absent anywhere on the page.
locator | the locator to use to find the element. |
value | the value to search for. |
ConditionalException | when the text did not become visible. |
Definition at line 1818 of file SlimWebDriver.java.
boolean nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.waitForValueNotEmpty | ( | String | locator | ) |
Waits for the element to have a value.
locator | the locator to use to find the element. |
ConditionalException | when the text did not become visible. |
Definition at line 1842 of file SlimWebDriver.java.
void nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.waitForVisible | ( | String | locator | ) |
Waits for an element to become visible (meaning visible and width and height != 0).
locator | the locator to use to find the element. |
ConditionalException | when the element was not found or the element did not become visible. |
Definition at line 1520 of file SlimWebDriver.java.
|
static |
The constant ATTR_TYPE.
Definition at line 97 of file SlimWebDriver.java.
|
static |
The constant ATTR_VALUE.
Definition at line 109 of file SlimWebDriver.java.
|
staticpackage |
The Browser.
Definition at line 145 of file SlimWebDriver.java.
|
static |
Definition at line 85 of file SlimWebDriver.java.
|
static |
Definition at line 78 of file SlimWebDriver.java.
|
static |
Definition at line 82 of file SlimWebDriver.java.
|
static |
Definition at line 77 of file SlimWebDriver.java.
|
static |
Definition at line 83 of file SlimWebDriver.java.
|
static |
Definition at line 81 of file SlimWebDriver.java.
|
static |
Definition at line 84 of file SlimWebDriver.java.
|
static |
Definition at line 79 of file SlimWebDriver.java.
|
static |
Definition at line 80 of file SlimWebDriver.java.
|
private |
Definition at line 166 of file SlimWebDriver.java.
|
package |
The Ctrl or cmd.
Definition at line 163 of file SlimWebDriver.java.
|
staticpackage |
The Dpr.
Definition at line 133 of file SlimWebDriver.java.
WebDriver nl.psek.fitnesse.fixtures.selenium.SlimWebDriver.driver = null |
The Driver.
Definition at line 159 of file SlimWebDriver.java.
|
static |
The constant ELEMENT_INPUT.
Definition at line 89 of file SlimWebDriver.java.
|
static |
The constant ELEMENT_TEXTAREA.
Definition at line 93 of file SlimWebDriver.java.
|
staticprivate |
Definition at line 121 of file SlimWebDriver.java.
|
staticprivate |
Definition at line 117 of file SlimWebDriver.java.
|
staticprivate |
Definition at line 114 of file SlimWebDriver.java.
|
staticprivate |
Definition at line 115 of file SlimWebDriver.java.
|
staticprivate |
Definition at line 118 of file SlimWebDriver.java.
|
staticprivate |
Definition at line 116 of file SlimWebDriver.java.
|
staticprivate |
Definition at line 119 of file SlimWebDriver.java.
|
staticprivate |
Definition at line 113 of file SlimWebDriver.java.
|
staticprivate |
Definition at line 110 of file SlimWebDriver.java.
|
staticprivate |
Definition at line 155 of file SlimWebDriver.java.
|
staticprivate |
Definition at line 120 of file SlimWebDriver.java.
|
staticprivate |
Definition at line 151 of file SlimWebDriver.java.
|
private |
Definition at line 165 of file SlimWebDriver.java.
|
staticprivate |
Definition at line 152 of file SlimWebDriver.java.
|
staticprivate |
Definition at line 150 of file SlimWebDriver.java.
|
staticprivate |
Definition at line 112 of file SlimWebDriver.java.
|
staticprivate |
Definition at line 111 of file SlimWebDriver.java.
|
static |
The constant remoteProfile.
Definition at line 129 of file SlimWebDriver.java.
|
static |
The constant SCREENSHOTLOCATION.
Definition at line 125 of file SlimWebDriver.java.
|
private |
Definition at line 164 of file SlimWebDriver.java.
|
staticprivate |
Definition at line 154 of file SlimWebDriver.java.
|
staticprivate |
Definition at line 153 of file SlimWebDriver.java.
|
static |
The constant TYPE_CHECKBOX.
Definition at line 101 of file SlimWebDriver.java.
|
static |
The constant TYPE_RADIO.
Definition at line 105 of file SlimWebDriver.java.
|
staticpackage |
The Usepropertyfilesupplieddpr.
Definition at line 141 of file SlimWebDriver.java.
|
staticpackage |
The Useusersupplieddpr.
Definition at line 137 of file SlimWebDriver.java.
|
staticpackage |
The Webdrivermanagerpropertiesfile.
Definition at line 149 of file SlimWebDriver.java.