VERSION
version 1.36SYNOPSIS
use WWW::Selenium;
my $sel = WWW::Selenium->new( host => "localhost",
port => 4444,
browser => "*iexplore",
browser_url => "http://www.google.com",
);
$sel->start;
$sel->open("http://www.google.com");
$sel->type("q", "hello world");
$sel->click("btnG");
$sel->wait_for_page_to_load(5000);
print $sel->get_title;
$sel->stop;
DESCRIPTION
Selenium Remote Control (SRC) is a test tool that allows you to write automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser. SRC provides a Selenium Server, which can automatically start/stop/control any supported browser. It works by using Selenium Core, a pure-HTML+JS library that performs automated tasks in JavaScript; the Selenium Server communicates directly with the browser using AJAX (XmlHttpRequest).<http://www.openqa.org/selenium-rc/>
This module sends commands directly to the Server using simple HTTP GET/POST requests. Using this module together with the Selenium Server, you can automatically control any supported browser.
To use this module, you need to have already downloaded and started the Selenium Server. (The Selenium Server is a Java application.)
Element Locators
Element Locators tell Selenium which HTML element a command refers to.The format of a locator is:- locatorType=argument
We support the following strategies for locating elements:
- •
- identifier=id: Select the element with the specified @id attribute. If no match isfound, select the first element whose @name attribute is id.(This is normally the default; see below.)
- •
- id=id:Select the element with the specified @id attribute.
- •
-
name=name:Select the first element with the specified @name attribute.
-
- username
- name=username
-
The name may optionally be followed by one or more element-filters, separated from the name by whitespace. If the filterType is not specified, value is assumed.
- name=flavour value=chocolate
-
- •
-
dom=javascriptExpression: Find an element by evaluating the specified string. This allows you to traverse the HTML Document ObjectModel using JavaScript. Note that you must not return a value in this string; simply make it the last expression in the block.
-
- dom=document.forms['myForm'].myDropdown
- dom=document.images[56]
- dom=function foo() { return document.links[1]; }; foo();
-
- •
-
xpath=xpathExpression: Locate an element using an XPath expression.
-
- xpath=//img[@alt='The image alt text']
- xpath=//table[@id='table1']//tr[4]/td[2]
- xpath=//a[contains(@href,'#id1')]
- xpath=//a[contains(@href,'#id1')]/@class
- xpath=(//table[@class='stylee'])//th[text()='theHeaderText']/../td
- xpath=//input[@name='name2' and @value='yes']
- xpath=//*[text()=``right'']
-
- •
-
link=textPattern:Select the link (anchor) element which contains text matching thespecified pattern.
-
- link=The link text
-
- •
-
css=cssSelectorSyntax:Select the element using css selectors. Please refer to http://www.w3.org/TR/REC-CSS2/selector.html (CSS2 selectors), http://www.w3.org/TR/2001/CR-css3-selectors-20011113/ (CSS3 selectors) for more information. You can also check the TestCssLocators test in the selenium test suite for an example of usage, which is included in the downloaded selenium core package.
-
- css=a[href=``#id3'']
- css=span#firstChild + span
-
Currently the css selector locator supports all css1, css2 and css3 selectors except namespace in css3, some pseudo classes(:nth-of-type, :nth-last-of-type, :first-of-type, :last-of-type, :only-of-type, :visited, :hover, :active, :focus, :indeterminate) and pseudo elements(::first-line, ::first-letter, ::selection, ::before, ::after).
-
- •
-
ui=uiSpecifierString:Locate an element by resolving the UI specifier string to another locator, and evaluating it. See the http://svn.openqa.org/fisheye/browse/~raw,r=trunk/selenium/trunk/src/main/resources/core/scripts/ui-doc.html (Selenium UI-Element Reference) for more details.
-
- ui=loginPages::loginButton()
- ui=settingsPages::toggle(label=Hide Email)
- ui=forumPages::postBody(index=2)//a[2]
-
Without an explicit locator prefix, Selenium uses the following defaultstrategies:
- dom, for locators starting with ``document.''
- xpath, for locators starting with ``//''
- identifier, otherwise
Element Filters
Element filters can be used with a locator to refine a list of candidate elements. They are currently used only in the 'name' element-locator.Filters look much like locators, ie.
- filterType=argument
Supported element-filters are:
- value=valuePattern
- Matches elements based on their values. This is particularly useful for refining a list of similarly-named toggle-buttons.
- index=index
- Selects a single element based on its position in the list (offset from zero).
String-match Patterns
Various Pattern syntaxes are available for matching string values:- glob:pattern:Match a string against a ``glob'' (aka ``wildmat'') pattern. ``Glob'' is akind of limited regular-expression syntax typically used in command-lineshells. In a glob pattern, ``*'' represents any sequence of characters, and ``?''represents any single character. Glob patterns match against the entirestring.
- regexp:regexp:Match a string using a regular-expression. The full power of JavaScriptregular-expressions is available.
- regexpi:regexpi:Match a string using a case-insensitive regular-expression.
- exact:string:Match a string exactly, verbatim, without any of that fancy wildcardstuff.
If no pattern prefix is specified, Selenium assumes that it's a ``glob''pattern.
For commands that return multiple values (such as verifySelectOptions),the string being matched is a comma-separated list of the return values,where both commas and backslashes in the values are backslash-escaped.When providing a pattern, the optional matching syntax (i.e. glob,regexp, etc.) is specified once, as usual, at the beginning of thepattern.
METHODS
The following methods are available:- $sel = WWW::Selenium->new( %args )
-
Constructs a new "WWW::Selenium" object, specifying a Selenium Server
host/port, a command to launch the browser, and a starting URL for the
browser.
Options:
-
-
"host"
host is the host name on which the Selenium Server resides.
-
"port"
port is the port on which the Selenium Server is listening.
-
"browser_url"
browser_url is the starting URL including just a domain name. We'll start the browser pointing at the Selenium resources on this URL, e.g. ``http://www.google.com'' would send the browser to ``http://www.google.com/selenium-server/SeleneseRunner.html''
-
"browser" or "browser_start_command"
This is the command string used to launch the browser, e.g. ``*firefox'', ``*iexplore'' or ``/usr/bin/firefox''
This option may be any one of the following:
-
-
"*firefox [absolute path]"
Automatically launch a new Firefox process using a custom Firefox profile. This profile will be automatically configured to use the Selenium Server as a proxy and to have all annoying prompts (``save your password?'' ``forms are insecure'' ``make Firefox your default browser?'' disabled. You may optionally specify an absolute path to your firefox executable, or just say ``*firefox''. If no absolute path is specified, we'll look for firefox.exe in a default location (normally c:\program files\mozilla firefox\firefox.exe), which you can override by setting the Java system property "firefoxDefaultPath" to the correct path to Firefox.
-
"*iexplore [absolute path]"
Automatically launch a new Internet Explorer process using custom Windows registry settings. This process will be automatically configured to use the Selenium Server as a proxy and to have all annoying prompts (``save your password?'' ``forms are insecure'' ``make Firefox your default browser?'' disabled. You may optionally specify an absolute path to your iexplore executable, or just say ``*iexplore''. If no absolute path is specified, we'll look for iexplore.exe in a default location (normally c:\program files\internet explorer\iexplore.exe), which you can override by setting the Java system property "iexploreDefaultPath" to the correct path to Internet Explorer.
-
"/path/to/my/browser [other arguments]"
You may also simply specify the absolute path to your browser executable, or use a relative path to your executable (which we'll try to find on your path). Warning: If you specify your own custom browser, it's up to you to configure it correctly. At a minimum, you'll need to configure your browser to use the Selenium Server as a proxy, and disable all browser-specific prompting.
-
"host"
-
Defaults to true, and will attempt to close the browser if the object goes out of scope and stop hasn't been called.
Number of connections LWP should cache. This is just a minor speed improvement. Defaults to 5.
Choose which HTTP method should be used for requests to the Selenium server. Only GET and POST are supported.
-
- $locator is an element locator
-
- $locator is an element locator
-
- $locator is an element locator
-
- $locator is an element locator
- $coord_string is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
-
- $locator is an element locator
- $coord_string is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
-
- $locator is an element locator
- $coord_string is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
-
- $locator is an element locator
- $event_name is the event name, e.g. "focus" or "blur"
-
- $locator is an element locator
-
- $locator is an element locator
- $key_sequence is Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119".
-
- $locator is an element locator
- $key_sequence is Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119".
-
- $locator is an element locator
- $key_sequence is Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119".
-
- $locator is an element locator
-
- $locator is an element locator
-
- $locator is an element locator
-
- $locator is an element locator
-
- $locator is an element locator
- $coord_string is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
-
- $locator is an element locator
- $coord_string is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
-
- $locator is an element locator
-
- $locator is an element locator
-
- $locator is an element locator
- $coord_string is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
-
- $locator is an element locator
- $coord_string is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
-
- $locator is an element locator
-
- $locator is an element locator
- $coord_string is specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
-
- $locator is an element locator
- $value is the value to type
Unlike the simple ``type'' command, which forces the specified value into the page directly, this commandmay or may not have any visible effect, even in cases where typing keys would normally have a visible effect.For example, if you use ``typeKeys'' on a form element, you may or may not see the results of what you typed inthe field.
In some cases, you may need to use the simple ``type'' command to set the value of the field and then the ``typeKeys'' command tosend the keystroke events corresponding to what you just typed.
-
- $locator is an element locator
- $value is the value to type
-
- $value is the number of milliseconds to pause after operation
-
- Returns the execution speed in milliseconds.
-
- $locator is an element locator
-
- $locator is an element locator
-
- •
-
label=labelPattern:matches options based on their labels, i.e. the visible text. (Thisis the default.)
-
- label=regexp:^[Oo]ther
-
- •
-
value=valuePattern:matches options based on their values.
-
- value=other
-
- •
-
id=id:matches options based on their ids.
-
- id=option1
-
- •
-
index=index:matches an option based on its index (offset from zero).
-
- index=2
-
-
If no option locator prefix is provided, the default behaviour is to match on label.
- $select_locator is an element locator identifying a drop-down menu
- $option_locator is an option locator (a label by default)
-
- $locator is an element locator identifying a multi-select box
- $option_locator is an option locator (a label by default)
-
- $locator is an element locator identifying a multi-select box
- $option_locator is an option locator (a label by default)
-
- $locator is an element locator identifying a multi-select box
-
- $form_locator is an element locator for the form you want to submit
-
- $url is the URL to open; may be relative or absolute
-
- $url is the URL to open, which can be blank
- $window_id is the JavaScript window ID of the window to select
-
- title=My Special Window:Finds the window using the text that appears in the title bar. Be careful;two windows can share the same title. If that happens, this locator willjust pick one.
- name=myWindow:Finds the window using its internal JavaScript ``name'' property. This is the second parameter ``windowName'' passed to the JavaScript method window.open(url, windowName, windowFeatures, replaceFlag)(which Selenium intercepts).
- var=variableName:Some pop-up windows are unnamed (anonymous), but are associated with a JavaScript variable name in the currentapplication window, e.g. ``window.foo = window.open(url);''. In those cases, you can open the window using``var=foo''.
-
If no window locator prefix is provided, we'll try to guess what you mean like this:
1.) if windowID is null, (or the string ``null'') then it is assumed the user is referring to the original window instantiated by the browser).
2.) if the value of the ``windowID'' parameter is a JavaScript variable name in the current application window, then it is assumedthat this variable contains the return value from a call to the JavaScript window.open() method.
3.) Otherwise, selenium looks in a hash it maintains that maps string names to window ``names''.
4.) If that fails, we'll try looping over all of the known windows to try to find the appropriate ``title''.Since ``title'' is not necessarily unique, this may have unexpected behavior.
If you're having trouble figuring out the name of a window that you want to manipulate, look at the Selenium log messageswhich identify the names of windows created via window.open (and therefore intercepted by Selenium). You will see messageslike the following for each window as it is opened:
"debug: window.open call intercepted; window ID (which you can use with selectWindow()) is "myNewWindow""
In some cases, Selenium will be unable to intercept a call to window.open (if the call occurs during or before the ``onLoad'' event, for example).(This is bug SEL-339.) In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, usingan empty (blank) url, like this: openWindow("``, ''myFunnyWindow").
- $window_id is the JavaScript window ID of the window to select
-
- If "windowID" is either not specified, or specified as``null'', the first non-top window is selected. The top window is the onethat would be selected by "selectWindow()" without providing a"windowID" . This should not be used when more than one popupwindow is in play.
- Otherwise, the window will be looked up considering"windowID" as the following in order: 1) the ``name'' of thewindow, as specified to "window.open()"; 2) a javascriptvariable which is a reference to a window; and 3) the title of thewindow. This is the same ordered lookup performed by"selectWindow" .
-
- $window_id is an identifier for the popup window, which can take on a number of different meanings
-
- $locator is an element locator identifying a frame or iframe
-
- $current_frame_string is starting frame
- $target is new frame (which might be relative to the current one)
-
- Returns true if the new frame is this code's window
-
- $current_window_string is starting window
- $target is new window (which might be relative to the current one, e.g., "_parent")
-
- Returns true if the new window is this code's window
-
- $window_id is the JavaScript window "name" of the window that will appear (not the text of the title bar) If unspecified, or specified as "null", this command will wait for the first non-top window to appear (don't rely on this if you are working with multiple popups simultaneously).
- $timeout is a timeout in milliseconds, after which the action will return with an error. If this value is not specified, the default Selenium timeout will be used. See the setTimeout() command.
Take note - every time a confirmation comes up, you mustconsume it with a corresponding getConfirmation, or elsethe next selenium operation will fail.
Take note - every time a confirmation comes up, you mustconsume it with a corresponding getConfirmation, or elsethe next selenium operation will fail.
-
- $answer is the answer to give in response to the prompt pop-up
-
- Returns true if there is an alert
-
- Returns true if there is a pending prompt
-
- Returns true if there is a pending confirmation
Under Selenium, JavaScript alerts will NOT pop up a visible alertdialog.
Selenium does NOT support JavaScript alerts that are generated in apage's onload() event handler. In this case a visible dialog WILL begenerated and Selenium will hang until someone manually clicks OK.
-
- Returns The message of the most recent JavaScript alert
If an confirmation is generated but you do not consume it with getConfirmation,the next Selenium action will fail.
NOTE: under Selenium, JavaScript confirmations will NOT pop up a visibledialog.
NOTE: Selenium does NOT support JavaScript confirmations that aregenerated in a page's onload() event handler. In this case a visibledialog WILL be generated and Selenium will hang until you manually clickOK.
-
- Returns the message of the most recent JavaScript confirmation dialog
NOTE: under Selenium, JavaScript prompts will NOT pop up a visibledialog.
NOTE: Selenium does NOT support JavaScript prompts that are generated in apage's onload() event handler. In this case a visible dialog WILL begenerated and Selenium will hang until someone manually clicks OK.
-
- Returns the message of the most recent JavaScript question prompt
-
- Returns the absolute URL of the current page
-
- Returns the title of the current page
-
- Returns the entire text of the page
-
- $locator is an element locator
-
- Returns the element value, or "on/off" for checkbox/radio elements
-
- $locator is an element locator
-
- Returns the text of the element
-
- $locator is an element locator
If you need to usea locator to refer to a single element in your application page, you canuse "this.browserbot.findElement("id=foo")" where ``id=foo'' is your locator.
-
- $script is the JavaScript snippet to run
-
- Returns the results of evaluating the snippet
-
- $locator is an element locator pointing to a checkbox or radio button
-
- Returns true if the checkbox is checked, false otherwise
-
- $table_cell_address is a cell address, e.g. "foo.1.4"
-
- Returns the text from the specified cell
-
- $select_locator is an element locator identifying a drop-down menu
-
- Returns an array of all selected option labels in the specified select drop-down
-
- $select_locator is an element locator identifying a drop-down menu
-
- Returns the selected option label in the specified select drop-down
-
- $select_locator is an element locator identifying a drop-down menu
-
- Returns an array of all selected option values in the specified select drop-down
-
- $select_locator is an element locator identifying a drop-down menu
-
- Returns the selected option value in the specified select drop-down
-
- $select_locator is an element locator identifying a drop-down menu
-
- Returns an array of all selected option indexes in the specified select drop-down
-
- $select_locator is an element locator identifying a drop-down menu
-
- Returns the selected option index in the specified select drop-down
-
- $select_locator is an element locator identifying a drop-down menu
-
- Returns an array of all selected option IDs in the specified select drop-down
-
- $select_locator is an element locator identifying a drop-down menu
-
- Returns the selected option ID in the specified select drop-down
-
- $select_locator is an element locator identifying a drop-down menu
-
- Returns true if some option has been selected, false otherwise
-
- $select_locator is an element locator identifying a drop-down menu
-
- Returns an array of all option labels in the specified select drop-down
-
- $attribute_locator is an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar"
-
- Returns the value of the specified attribute
-
- $pattern is a pattern to match with the text of the page
-
- Returns true if the pattern matches the text, false otherwise
-
- $locator is an element locator
-
- Returns true if the element is present, false otherwise
-
- $locator is an element locator
-
- Returns true if the specified element is visible, false otherwise
-
- $locator is an element locator
-
- Returns true if the input element is editable, false otherwise
-
- Returns the IDs of all buttons on the page
-
- Returns the IDs of all links on the page
-
- Returns the IDs of all field on the page
-
- $attribute_name is name of an attribute on the windows
-
- Returns the set of values of this attribute from all known windows.
-
- $locator is an element locator
- $movements_string is offset in pixels from the current location to which the element should be moved, e.g., "+70,-300"
If the mouse speed is greater than the distance between the two dragged objects, we'lljust send one ``mousemove'' at the start location and then one final one at the end location.
-
- $pixels is the number of pixels between "mousemove" events
-
- Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10)
-
- $locator is an element locator
- $movements_string is offset in pixels from the current location to which the element should be moved, e.g., "+70,-300"
-
- $locator_of_object_to_be_dragged is an element to be dragged
- $locator_of_drag_destination_object is an element whose location (i.e., whose center-most pixel) will be the point where locatorOfObjectToBeDragged is dropped
-
- Returns Array of identifiers of all windows that the browser knows about.
-
- Returns Array of names of all windows that the browser knows about.
-
- Returns Array of titles of all windows that the browser knows about.
-
- Returns the entire HTML source
-
- $locator is an element locator pointing to an input element or textarea
- $position is the numerical position of the cursor in the field; position should be 0 to move the position to the beginning of the field. You can also set the cursor to -1 to move it to the end of the field.
-
- $locator is an element locator pointing to an element
-
- Returns of relative index of the element to its parent (starting from 0)
-
- $locator1 is an element locator pointing to the first element
- $locator2 is an element locator pointing to the second element
-
- Returns true if element1 is the previous sibling of element2, false otherwise
-
- $locator is an element locator pointing to an element OR an element itself
-
- Returns of pixels from the edge of the frame.
-
- $locator is an element locator pointing to an element OR an element itself
-
- Returns of pixels from the edge of the frame.
-
- $locator is an element locator pointing to an element
-
- Returns width of an element in pixels
-
- $locator is an element locator pointing to an element
-
- Returns height of an element in pixels
-
- $locator is an element locator pointing to an input element or textarea
-
- Returns the numerical position of the cursor in the field
-
- $expression is the value to return
-
- Returns the value passed in
-
- $xpath is the xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you.
-
- Returns the number of nodes that match the specified xpath
-
- $locator is an element locator pointing to an element
- $identifier is a string to be used as the ID of the specified element
-
- $allow is boolean, true means we'll prefer to use native XPath; false means we'll only use JS XPath
-
- $ignore is boolean, true means we'll ignore attributes without value at the expense of xpath "correctness"; false means we'll sacrifice speed for correctness.
-
- $script is the JavaScript snippet to run
- $timeout is a timeout in milliseconds, after which this command will return with an error
-
- $timeout is a timeout in milliseconds, after which the action will return with an error
Selenium constantly keeps track of new pages loading, and sets a ``newPageLoaded''flag when it first notices a page load. Running any other Selenium command afterturns the flag to false. Hence, if you want to wait for a page to load, you mustwait immediately after a Selenium command that caused a page-load.
-
- $timeout is a timeout in milliseconds, after which this command will return with an error
-
- $frame_address is FrameAddress from the server side
- $timeout is a timeout in milliseconds, after which this command will return with an error
-
- Returns all cookies of the current page under test
-
- $name is the name of the cookie
-
- Returns the value of the cookie
-
- $name is the name of the cookie
-
- Returns true if a cookie with the specified name is present, or false otherwise.
-
- $name_value_pair is name and value of the cookie in a format "name=value"
- $options_string is options for the cookie. Currently supported options include 'path', 'max_age' and 'domain'. the optionsString's format is "path=/path/, max_age=60, domain=.foo.com". The order of options are irrelevant, the unit of the value of 'max_age' is second. Note that specifying a domain that isn't a subset of the current domain will usually fail.
-
- $name is the name of the cookie to be deleted
- $options_string is options for the cookie. Currently supported options include 'path', 'domain' and 'recurse.' The optionsString's format is "path=/path/, domain=.foo.com, recurse=true". The order of options are irrelevant. Note that specifying a domain that isn't a subset of the current domain will usually fail.
-
- $log_level is one of the following: "debug", "info", "warn", "error" or "off"
-
- $script is the JavaScript snippet to run
-
- locator: the string the user passed in
- inWindow: the currently selected window
- inDocument: the currently selected document
-
The function must return null if the element can't be found.
- $strategy_name is the name of the strategy to define; this should use only letters [a-zA-Z] with no spaces or other punctuation.
-
- $filename is the path to the file to persist the screenshot as. No filename extension will be appended by default. Directories will not be created if they do not exist, and an exception will be thrown, possibly by native code.
- $kwargs is a kwargs string that modifies the way the screenshot is captured. Example: "background=#CCFFDD". Currently valid options:
-
-
- background the background CSS for the HTML document. This may be useful to set for capturing screenshots of less-than-ideal layouts, for example where absolute positioning causes the calculation of the canvas dimension to fail and a black background is exposed (possibly obscuring black text).
-
-
- $rollup_name is the name of the rollup command
- $kwargs is keyword arguments string that influences how the rollup expands into commands
-
- $script_content is the Javascript content of the script to add
- $script_tag_id is (optional) the id of the new script tag. If specified, and an element with this id already exists, this operation will fail.
-
- $script_tag_id is the id of the script element to remove.
-
- $library_name is name of the desired library Only the following three can be chosen:
-
-
- ``ajaxslt'' - Google's library
- ``javascript-xpath'' - Cybozu Labs' faster library
- ``default'' - The default library. Currently the default library is ``ajaxslt'' .
-
If libraryName isn't one of these three, then no change will be made.
-
-
- $context is the message to be sent to the browser
-
- $field_locator is an element locator
- $file_locator is a URL pointing to the specified file. Before the file can be set in the input field (fieldLocator), Selenium RC may need to transfer the file to the local machine before attaching the file in a web page form. This is common in selenium grid configurations where the RC server driving the browser is not the same machine that started the test. Supported Browsers: Firefox ("*chrome") only.
-
- $filename is the absolute path to the file to be written, e.g. "c:\blah\screenshot.png"
-
- Returns The base 64 encoded string of the screen shot (PNG file)
-
- $kwargs is A kwargs string that modifies the way the screenshot is captured. Example: "background=#CCFFDD". This may be useful to set for capturing screenshots of less-than-ideal layouts, for example where absolute positioning causes the calculation of the canvas dimension to fail and a black background is exposed (possibly obscuring black text).
-
- Returns The base 64 encoded string of the page screenshot (PNG file)
-
- Returns The last N log messages as a multi-line string.
-
- $keycode is an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes!
-
- $keycode is an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes!
-
- $keycode is an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes!
-
- $expected_location is the location to match.
-
Note: This function is deprecated, use get_location() instead.
-
- $locator is an element locator pointing to a checkbox or radio button.
-
Note: This function is deprecated, use is_checked() instead.
See the select command for more information about option locators.
-
- $locator is an element locator.
- $option_locator is an option locator, typically just an option label (e.g. "John Smith").
-
Note: This function is deprecated, use the get_selected_*() methods instead.
-
- $locator is an element locator.
-
Note: This function is deprecated, use get_selected_labels() instead.
Note: This function is deprecated, use get_location() instead.
NAME
WWW::Selenium - Perl Client for the Selenium Remote Control test toolBUGS
The Selenium Remote Control JIRA issue tracking system is available online at <http://jira.openqa.org/browse/SRC>.AUTHORS
- Maintained by: Matt Phillips <[email protected]>, Luke Closs <[email protected]>
- Originally by Mattia Barbon <[email protected]>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2006 by ThoughtWorks, Inc.This is free software, licensed under:
The Apache License, Version 2.0, January 2004