The end of life (EOL) date for this module was on 30 April, 2019.
EUEM Netprobe User Guide
Introduction
The EUEM (End User Experience Monitoring) plug-in is a Netprobe plug-in that measures aspects of a user's experience and interaction with a website. It is a next generation Web-MON that is designed to be easier to use and configure, and is more extensible than the original Web-Mon. EUEM integrates out of the box with Geneos - there is no need to use the Extractor plug-in to reformat HTML into a dataview.
Using Mozilla Firefox, you can record a scenario with ease - interacting with a web page and its elements as in a normal browser session. The EUEM plug-in for Firefox translates this scenario into a format that can be uploaded into the Gateway Setup Editor (GSE). The scenario script is then transformed into executable JavaScript that is utilised by PhantomJS, an open-source headless WebKit implementation. Information gathered by PhantomJS is then visualised on the Active Console (AC).
Scenarios, Steps and Elements
Central to understanding the EUEM plug-in is the relationship between scenarios, steps and elements.
A scenario represents a user's interaction with a web page or a series of web pages. It can be as simple as a user viewing a web page, or it can be more complex, involving interaction with the elements of the web page. You can make selections from multi-select options, complete and submit a form, download a file from the page, and perform many other actions.
Scenarios consist of steps which correspond to a single command carried out on a web page. These steps are carried out in sequence. For example, the usual first step in a scenario is to open a web page/URL, which corresponds to an open command. You can then carry out more steps on the web page using commands corresponding to entering text, submitting a form, selecting an option dropdown, etc.
Each step has one to many elements. A step to open a web page will include all of the elements that make up a web page - the HTML, the images, and the JavaScript files that are included with the page.
Walkthrough
There are three stages in using EUEM:
- Scenario Creation - the recording of a scenario as a user uses a web site.
- Scenario Playback - the playback of a scenario script to collect data for monitoring the user experience.
- Scenario Visualisation - the visual presentation of data collected from scenario playback.
Scenario Creation
Scenarios are created by using Selenium IDE with a Geneos EUEM plug-in for the IDE to record a user interacting with a website. Selenium IDE itself is installed as a plug-in for Mozilla Firefox, and the Geneos EUEM plug-in is installed in a similar manner.
On opening Selenium IDE, you can browse through a website and perform various actions on web pages. Selenium IDE will automatically record the scenario which will consist of a sequence of commands. If required, you can insert explicit commands into the scenario script using Selenium IDE. Explicit commands such as assertions can be executed to evaluate a web page - for example, an assertion can be used to determine if specific text is present on the web page.
Once the scenario recording is complete and the script is ready, you can use the Geneos EUEM plug-in for Firefox to copy the script into the clipboard. The script format used by the Geneos plug-in is JavaScript Object Notation (JSON) which is easy to understand and modify. You can create and maintain a library of scripts. Scenario scripts are uploaded into Geneos using a Script Editor that is included with the Gateway Setup Editor (GSE). The script itself can be edited, and the script editor checks for syntax.
Using the GSE, you can configure parameters for running scenarios. Basic and advanced settings for the EUEM plug-in, including proxy information, can be configured using the GSE.
The JSON script is transformed into an executable JavaScript at the NetProbe end by a Generator component.
Scenario Playback
At the heart of EUEM's scenario playback is PhantomJS, which is a headless WebKit implementation. PhantomJS utilises the executable JavaScript generated by the NetProbe. CasperJS, a library for PhantomJS, is also referenced by the JavaScript files.
A Launcher component on the NetProbe spawns multiple jobs, with each one running an instance of PhantomJS. A Scheduler component manages these jobs and ensures efficient running of all the scenarios by distributing the scenarios to the different jobs.
In the background, the EUEM plug-in maintains a script catalogue of executable Java Scripts in a NetProbe folder. Results of scenario runs are also maintained in files, along with other files related to the scenario such as screenshots, downloaded files, or MHT files.
Scenario Visualisation
In this first phase of EUEM development, visualisation is supported using the Active Console (AC).
The EUEM plug-in collects data on each scenario and outputs this data in a format that is parsed into a dataview. The complete data gathered by PhantomJS is also available in a JSON file.
There are two views available in the AC. The first view is a Summary View which contains a summary of scenarios running on the same sampler. The second view is a Scenario View which contains a detailed account of the steps and elements in the scenario.
Views
The EUEM plug-in has two views - a Summary View that displays all the scenarios running for a sampler, and a Scenario View that displays each running scenario individually.
EUEM Summary View
This view provides a dynamic view of the configured EUEM scenarios for the sampler. Each row in the view presents summary data for a single scenario.
EUEMSummary Headline Legend
Name | Description |
---|---|
totalScenarios | The total number of scenarios configured. |
scenariosPassed | A count of the number of scenarios that have passed. |
scenariosInError | A count of the number of scenarios that have errors. |
EUEMSummary Table Legend
Name | Description |
---|---|
scenario | The configured name of the scenario. |
samplingStatus |
For scenarios, the status can be:
|
duration | This is the time taken to playback the scenario. |
numSteps | Total number of steps in the scenario. |
stepsInErr | A count of the number of steps in the scenario that have errors. |
active |
This flag can either be:
|
lastExecTime | The start time for the last execution of the scenario script. |
lastSucExTime | The start time for the last successful execution of the scenario script. A successful execution contains no steps in error. |
Prerequisites for Recording Scenarios
There are three components that need to be installed in order to record scenario scripts for EUEM:
- Mozilla Firefox
- Selenium IDE
- Geneos EUEM Firefox Plug-in
EUEM has been verified to work with Firefox version 52.x and Selenium IDE version 2.91.
Selenium IDE is not supported on Firefox versions higher than 52.x.
Mozilla Firefox
Mozilla Firefox can be downloaded from http://www.mozilla.org/en-US/firefox/new/.
Installation is well-documented on the Mozilla website.
Selenium IDE
Selenium IDE is the primary tool for recording scenarios.
The Selenium IDE website is http://seleniumhq.org/projects/ide/. Selenium IDE can be downloaded via a link at the bottom right of the web page.
Installation is documented on the Selenium IDE website: http://seleniumhq.org/docs/02_selenium_ide.html#installing-the-ide
Geneos EUEM Firefox Plug-in
Follow these steps to install the Geneos EUEM Firefox plug-in:
- Open Mozilla Firefox.
- On the toolbar, select Tools > Add-ons. This will open the Add-ons Manager in a tab on the browser.
- Click the "Tools for all add-ons" button and select "Install Add-on From File".
- On the dialog box, navigate to the Geneos EUEM Firefox plug-in file (itrs-geneos-euem.xpi) and press Open. The EUEM Firefox plug-in should show up on the Firefox Add-ons list.
Note: The Geneos EUEM Firefox plug-in (itrs-geneos-euem.xpi) can be found under the "doc" folder of the Active Console installation folder.
Recording Scenario Scripts
Recording with Selenium IDE
To record a scenario script, follow these steps:
- On Mozilla Firefox, click Tools from the toolbar and select Selenium IDE. This will open Selenium IDE in a separate window, which by default will be in recording mode. You can verify this by holding the mouse pointer over the red record button on the upper right.
- On Firefox, navigate to the web page to be monitored and carry out the actions. Selenium IDE will record your actions as commands on the scenario script.
- When the scenario is completed, click the record button to stop Selenium IDE from recording.
- To save the scenario script, click File on the toolbar, select "Export Test Case As" and then select "Geneos EUEM Format" to save the script as a EUEM JSON file (*.geuem).
Note: This file can be loaded into Selenium IDE from the file system.
Inserting Explicit Commands
Not all commands are automatically recorded by Selenium IDE. Commands such as assertions and accessors are inserted manually by the user, either by using Selenium IDE or by using a plain text editor for the scenario script itself.
To insert an explicit command:
- Right-click on the script in Selenium IDE.
- Select "Insert New Command" from the context menu.
Note: The new command is inserted above the highlighted step.
- Select the command to insert using the Command dropdown or simply type it in. In the example below, assertText is inserted.
- The assertText command requires a parameter - a text pattern to assert against. On the Target text field, enter the text pattern to be used in the assertion. In this example, "Dashboard" is entered. This means that the scenario will assert the presence of "Dashboard" text on the web page.
Note: Commands can have as many as two parameters. The Target field is used for the first parameter, and Value is used for the second.
Using the Geneos EUEM Firefox Plug-in
When the Geneos EUEM Firefox Plug-in is installed in Firefox, a toolbar will appear in Selenium IDE:
The toolbar gives access to custom commands that will assist in recording scenario scripts for EUEM.
Button | Description |
---|---|
Copy to Clipboard |
Copies the script to the clipboard. You can paste the script into the GSE Script Editor. |
Set Viewport |
Sets the viewport of the browser. This is used to determine the dimensions of a screenshot. |
Take a Screenshot |
Takes a screenshot and places the image in the scenario run folder on the NetProbe. |
Capture as MHT |
Captures the current web page as a MHT archive file to be saved in the scenario run folder on the NetProbe. |
Login with Basic Authentication |
This is an alternate command to open a web page that has a username/password prompt. Selenium IDE cannot capture web pages with a login prompt - the script will timeout at the open() command. Note: When this command is used, you no longer need to use the open() command. |
Download File |
Inserts the custom command downloadFile(). The downloaded files are saved in the scenario run folder on the NetProbe. |
Encrypt Value Field |
Encrypts the value parameter on the highlighted step. This is useful for encrypting username and password. For example, the script below has an encrypted password field highlighted:
Clicking on the Encrypt Value Field button encrypts the value of the password:
When the script is copied into the clipboard, this field will be encrypted. The field is unencrypted prior to playback. Note: The Encrypt Value Field button works on any command with a value parameter. |
Scenario Script Format
Scenario scripts are saved in the NetProbe scenarios folder with an extension of *.geuem. Below is a simple example of a script that starts with a user performing a search for ITRS Group on google.com and navigating to the ITRS Group web site. It ends with the user clicking on the Products link.
"url": "http://www.google.com.ph/",
"scenario": "ITRS",
"noofsteps": 5,
"steps": [
{
"step": "open",
"target": "/",
"value": ""
},
{
"step": "type",
"target": "id=gbqfq",
"value": "ITRS Group"
},
{
"step": "click",
"target": "id=gbqfb",
"value": ""
},
{
"step": "click",
"target": "css=em",
"value": ""
},
{
"step": "clickAndWait",
"target": "link=Products",
"value": ""
}
]
}
The fields on the scenario script are described below.
The header section contains the following fields.
Scenario View
This view shows details of a scenario, with its steps and elements. The Scenario View can be configured to show only steps.
Scenario Headline Legend
Name | Description |
---|---|
baseURL | The URL of the initial request at the start of the scenario. |
totalSteps | The total number of steps for the scenario. |
stepsPassed | A count of the number of steps that have passed for that scenario. |
stepsInErr |
A count of the number of steps that have failed.
|
duration | The time taken to playback the scenario. |
startExTime | The start time for the execution of the scenario. |
endExTime | The end time for the execution of the scenario. |
serverType | If the server publishes a type (Server header) then this will be displayed here. If a proxy server has responded with an error then this will be the proxy server type. Otherwise, server type is UNKNOWN. |
protocol | Whether http or https is being used. This is based on the baseURL. |
port | The port being used. This will typically be 80 and is based on the baseURL. |
Script Editor
The Script Editor allows the user to configure a Geneos EUEM script. This script can be copied from Selenium IDE and pasted into the Script Editor. The script format is JSON.
Note: The Script Editor checks for syntax of the JSON file.
Historical Result Files
The EUEM plug-in stores generated files and results of playback runs on the NetProbe directory.
Directory Structure
The EUEM folder is located in the plug-ins folder in the NetProbe installation.
The structure is as follows:
euem/
catalog/
sampler1/
_last/
gen/
runs/
<scenario1>/
<run1>/
<run2>/
<scenario2>/
scenarios/
sampler2/
…
Files and Folders
The following folders and files are found in the EUEM directory.
_last/Folder
This folder contains csv files with the latest run results for each scenario.
The following files are stored in this folder:
File | Description |
---|---|
Result file (*.result) |
This is a csv file that contains a subset of the JSON file that is picked up by the NetProbe and used for the dataview. It contains information on the last run. This file is overwritten on every run.
|
gen/ Folder
This folder contains generated executable JavaScript (*.js) files that can be run by PhantomJS.
File | Description |
---|---|
JavaScript files (*.js) | There is one *.js file corresponding to each *.geuem file in the scenarios folder. |
Scenario Run Folders
There is a sub-folder for each configured scenario under the runs/ folder. These folders are named based on their scenario names.
Under each scenario folder is a sub-folder for each playback run. The naming convention used for these folders is YYYY_MM_DDTHH_MM_SSZ, based on the start date and time of the execution of the script.
Several files are stored in this folder:
File | Description |
---|---|
Scenario Configuration file (scenario-common.config) | There is one configuration file for each scenario run folder. This file is not for editing by the user. It contains PhantomJS configuration information - such as proxy authentication, auto-proxy configuration, SSL configuration and other command line information for PhantomJS. This file exists because of a string length limitation in passing command line arguments to PhantomJS. |
HAR file (*.har) | This is a HTTP archive file used to save information on page elements. One HAR file is generated for each web page/URL accessed in the scenario. |
JSON Results File (*.json) | This is a JSON file that contains the complete data gathered by PhantomJS. |
MHT file (*.mht) | If the storeAsMHT() command is used in the scenario, there will be a MHT file in this folder. |
Screenshot (*.png, *jpeg, *.pdf) | If a screenshot is generated in the scenario, a screenshot file will be found in the folder. |
Downloaded file(s) | If the downloadFile() command is used, the downloaded file will be saved here. |
scenarios/ Folder
This folder contains the scenario scripts for the NetProbe.
File | Description |
---|---|
Scenario Script (*.geuem) | This is the scenario script generated from the EUEM Firefox plug-in. The scenario script is a JSON file. There is one file per scenario. |
Selenium Commands
There are three types of Selenium commands available in Selenium IDE: Actions, Accessors and Assertions. Each type of command is described below. There are over 500 Selenium commands, but only a subset, useful for monitoring, is supported by the Geneos EUEM plug-in.
Each command call has three elements:
- Command - the specific Selenium command, which can be an action, accessor or an assertion.
- Target - the page element on which the command will be performed. By convention, this is also the first parameter in a command. In Selenium, an element locator is a means of telling the command which page element is being referred to; it is an identifier.
- Value - the value of the user input. By convention, this is the second parameter in a command. For example, when using the type() command, the value is the text typed by the user.
Note: The use of target and value fields is very flexible and does not have to refer to element locators and values.
This section defines key terms to understand Selenium commands and lists the actions, accessors and assertions that are supported by EUEM.
Definitions
Actions
Actions are commands that generally manipulate the state of the application. They perform tasks that the user will carry out on a web page - for example, clicking a link or selecting an option. If an action fails, the execution of the current scenario is stopped.
Many actions have an "AndWait" suffix, for example, "clickAndWait". The "AndWait" suffix will cause the EUEM to make a call to the server and then wait for a new page to load.
Accessors
Accessors examine the state of the application and store the results in variables, e.g. "storeTitle". They are prefixed by "store" and are explicitly inserted by the user in a scenario script either by using the Selenium IDE or by manually manipulating the script itself. In EUEM, the variables are stored in the scenario run results file (JSON format).
Variables are found in a section of the .json file generated for each scenario run under the runs folder. For example:
"variables": {
"system": {
"url": "https://192.168.100.27/"
},
"user": {}
},
There are two parts to the variables section. The first is "system", where EUEM stores system variables. The system variables include the following:
- Base URL
- Scenario Name
- Total steps
- Passed step count.
System variables can be accessed in the value field for other commands or by using echo() with syntax "${system.variable}".
The second is "user", where EUEM stores variables specified by the user in a scenario script.
User variables can be accessed in the value field for other commands or by using echo() with syntax "${variable}".
Assertions
Assertions verify that the state of the application conforms to what is expected. They are similar to accessors in that they examine the state of the application. There are three modes of assertions:
- assert - commands with this prefix perform a hard assertion. This means that when an assert fails, the scenario is aborted.
- verify - commands with this prefix perform a soft assertion. This means that when a verify fails, the scenario continues execution and logs the failure.
- waitFor - commands with this prefix wait for some condition to become true. This is useful for AJAX applications. They will succeed immediately if the condition is already true. However, they will fail and halt the test if the condition does not become true within the current timeout setting.
Locator
An element locator tells EUEM which HTML element a command refers to - it is essentially an identifier. They are frequently used as attributes in Selenium commands. There are several ways of identifying a HTML element:
- Identifier/ID
- Name
- DOM
- Xpath
- CSS
This topic is discussed in the Selenium IDE documentation: http://seleniumhq.org/docs/02_selenium_ide.html
Behaviour
When using Selenium IDE to record scenario scripts, some Selenium commands are supported right out of the box. For example, if you click a button on a web page, Selenium IDE will record this as "click". Other commands are not directly supported.
The behaviour of each command is classified as follows:
- Automatically supported - the command is directly used by Selenium IDE. When interacting with a web page, Selenium IDE will use the command when appropriate.
- Explicit command - the command is not directly used by Selenium IDE. To use an explicit command, you will need to insert the command in the scenario script - either by using Selenium IDE or by hand.
- Alternate command - this is a command that can be used explicitly in place of the automatically supported command. For example, when checking a checkbox on a web page, Selenium IDE records this activity as a "click". Instead of click, you can replace this command with a "check" by using Selenium IDE or by hand.
Text Patterns
Many commands, particularly assertions, use text patterns as parameters. For example, assertText(locator, pattern). Pattern refers to the text pattern for the command to compare against.
EUEM supports an exact text match for use with these commands. This means that the text seen by the user on the web page is checked against the exact text entered for the command in the scenario. Whitespaces before and after text and special characters such as carriage returns, are removed prior to comparison.
Actions
This section lists the actions supported by EUEM.
This command adds a selection to the set of selected options in a multi-select element using an option locator.
Scenario Table Legend
Name | Description |
---|---|
step | Identifies the step and its number. For example, step1. For elements, this column identifies the step and the number of the element. For example, step1#1. |
id | The ID of the element which is usually the Target in Selenium IDE. This column is blank for steps. |
status |
For steps, the status can be:
For elements, the status can be:
|
duration |
For steps, this is the time taken to
execute the step. | For elements, this is
the time taken to download or run the web
page element. | On or before the first run
of the scenario, lastDuration will be N/A
(not applicable).
|
lastDuration | This is the time taken to execute the step or download the element during the previous run of the scenario. |
responseCode | The HTTP response code. This will be, for example, 200 for OK or 404 for Not Found. |
responseText | A textual description of the response code, as sent by the server. |
downloadSize | The number of kilobytes downloaded for the step or element. If a Transfer-Encoding is used by the server then this will not necessarily be the same as the length of the content. |
exTime | The start execution date and time for the step or the element. |
description |
A description of the step or the element. |
For steps, this is the name of the command,
e.g. open. | For elements, this is either:
- The full URL of the element for an open()
step - The user configured parameter of the
command. For example, the text output for
echo(), the text typed by the user for
type(), or the timeout duration in
milliseconds for pause().
|
type |
|
error | Descriptions of any errors or reasons for failure on the steps or elements. For example, an error for the "type" command can be "Failed to send characters to page element(css=textarea)." |
Menu Options
EUEM has an additional context-menu option for viewing error messages when a scenario doesn't run correctly.
Show Scenario Detailed Log
This command allows you to view a detailed log of a scenario error. It can be accessed by a right-click on the samplingStatus field and selecting "Show Scenario Detailed Log" from the context menu.
Clicking the menu item will pop up an Output box that either gives a stack trace or more description on the error.
Plug-in Configuration
The EUEM plug-in can be configured in two steps:
- Record scenario scripts using the Selenium IDE with the Geneos EUEM plug-in installed.
- Upload the scenario scripts into the Gateway Setup Editor (GSE) and configure the parameters for playback of the scripts.
This section describes the second step and subsequent sections describe the first step. There are basically two levels of configuration in the Gateway Setup Editor for EUEM:
- Scenario level configuration. The first set of configuration is for individual scenarios. For example, timeouts can be configured for a scenario, overriding the settings on the sampler level configuration.
- Sampler level configuration. This level of configuration applies to all scenarios in the sampler.
Scenario Level Configuration
Located on the Basic tab of the EUEM plug-in configuration in the Gateway Setup Editor, the following parameters can be configured for individual scenarios:
scenarios > scenario > script > code
The scenario script in JSON format. This textarea is located within the script popup.
scenarios > scenario > elementDetails
A checkbox that enables showing the Element rows in Scenario View. If unchecked, only Steps are shown.
scenarios > scenario > activeTime
The active time setting references an active time variable in the gateway setup.
scenarios > scenario > timeout
This section is for timeout configuration for an individual scenario and for the steps in that scenario. It has its own dialog box.
Mandatory: No
scenarios > scenario > timeout > scenarioTimeout
The timeout (in seconds) for a scenario.
The scenario timeout applies for the entire scenario. If the steps take longer than the configured scenario timeout, the scenario will time out and the remaining steps will FAIL.
scenarios > scenario > timeout > stepTimeout
The timeout (in seconds) for a step.
Note: When a step is timed out, EUEM will proceed to the next step in a scenario and the timed out step will FAIL. A step timeout for a scenario can be overridden by using the setTimeout() command.
scenarios > scenario > connection
This section is used for configuring default proxy information and SSL settings for an individual scenario. It can be used as an override at the scenario level when a default connection is set at the sampler level.
Mandatory: No
scenarios > scenario > connection > proxy
See connection > proxy.
scenarios > scenario > connection > proxy > proxyServer > authentication > none
See connection > proxy > proxyServer > authentication > none.
scenarios > scenario > connection > proxy > proxyServer > authentication > password
See connection > proxy > proxyServer > authentication > password.
scenarios > scenario > connection > proxy > proxyServer > authentication > password > loginCredentials
See connection > proxy > proxyServer > authentication > password > loginCredentials.
scenarios > scenario > connection > proxy > proxyAutoConfig > authentication > none
See connection > proxy > proxyAutoConfig > authentication > none.
scenarios > scenario > connection > proxy > proxyAutoConfig > authentication > password
See connection > proxy > proxyAutoConfig > authentication > password.
scenarios > scenario > connection > proxy > proxyAutoConfig > authentication > password > loginCredentials
See connection > proxy > proxyAutoConfig > authentication > password > loginCredentials.
scenarios > scenario > connection > sslSettings > personalCertificate > certificateFile
See connection > sslSettings > personalCertificate > certificateFile.
scenarios > scenario > connection > sslSettings > personalCertificate > certificatePassPhrase
See connection > sslSettings > personalCertificate > certificatePassPhrase.
scenarios > scenario > connection > sslSettings > certificateAuthority > caPath
See connection > sslSettings > certificateAuthority > caPath.
Sampler Level Configuration
Located on the Advanced tab of the EUEM plug-in configuration in the Gateway Setup Editor, the following parameters can be configured for a EUEM sampler:
defaultScenarioTimeout
Defines the default timeout (in seconds) for the scenario if there is no specific timeout configured for a scenario.
defaultStepTimeout
Defines the default timeout (in seconds) for a step if there is no specific step timeout configured for a scenario.
maxParallelJobs
Defines the maximum number of jobs (i.e. scenarios) running in parallel.
connection
Used for configuring default proxy information and SSL settings for all scenarios in the sampler.
Note: If there is no scenario level connection configured, the default settings will be used.
Mandatory: No
connection > proxy
There are two choices on the Proxy dropdown, which determines what proxy settings to use.
Possible values:
Setting | Description |
---|---|
proxyServer | The connection uses a proxy server. |
proxyAutoConfig | The connection uses a PAC (proxy auto configuration) file. |
connection > proxy > proxyServer > host
The IP address of the proxy server.
connection > proxy > proxyServer > port
The port number used by the proxy server.
Note: Most proxy servers use 8080.
connection > proxy > proxyServer > type
Indicates the type of proxy server being used.
Possible values:
Setting | Description |
---|---|
HTTP | The proxy server is HTTP. This includes HTTPS. |
SOCKS | The proxy server is SOCKS. |
connection > proxy > proxyServer > authentication
This is used for configuring login credentials and a password for the proxy server.
connection > proxy > proxyServer > authentication > none
Used to configure the proxy server not to use authentication.
connection > proxy > proxyServer > authentication > password
Used to configure a password type of authentication for the proxy server.
connection > proxy > proxyServer > authentication > password > loginCredentials
This configuration contains details of the username and password.
connection > proxy > proxyAutoConfig
This section contains configuration for using a proxy auto-configuration file.
connection > proxy > proxyAutoConfig > URL
The URL of a PAC file. EUEM will use this URL to retrieve the PAC file. The PAC file lasts only for the session as it is stored in memory and is loaded dynamically.
connection > proxy > proxyAutoConfig > authentication
Used for configuring a password for the PAC file.
connection > proxy > proxyAutoConfig > authentication > none
Used to configure the proxy server not to use authentication.
connection > proxy > proxyAutoConfig > authentication > password
Used to configure a password type of authentication for the proxy server.
connection > proxy > proxyAutoConfig > authentication > password > loginCredentials
This configuration contains details of the username and password.
connection > sslSettings > ignoreSslErrors
A checkbox that indicates whether EUEM will ignore SSL errors. If checked, a SSL error will not prevent EUEM from performing other steps in the scenario. If unchecked, the SSL error will be shown and the scenario will not be completed. In the browser, this is analogous to adding a security exception.
connection > sslSettings > personalCertificate
This section contains configuration for supporting PKCS12.
connection > sslSettings > personalCertificate > certificateFile
This is a folder path to the Public-Key Cryptography Standards (PKCS) #12 certificate. The file extension for PKCS #12 files is ".p12". There is a NetProbe folder that can be used for this purpose: /netprobe/plugin/euem/certificates/personal.
connection > sslSettings > personalCertificate > certificatePassPhrase
This is the password for the certificate file.
connection > sslSettings > certificateAuthority
This section contains configuration for supporting one-way SSL.
Mandatory: No
connection > sslSettings > certificateAuthority > caPath
This is a folder path to the digital certificate issued by a certificate authority. The digital certificate certifies the ownership of a public key by the named subject of the certificate. There is a NetProbe folder that can be used for this purpose: /netprobe/plugin/euem/certificates/authorities.
resultFilesRetentionPeriod
This defines the retention period for result files. Based on the configured retention period, the Netprobe deletes old scenario run folders and their included files based on the folder's timestamp. The default retention period is three days.
Note: This plug-in retains three days of folders and files by scenario that may consume a large amount of disk space in your machine.
resultFilesRetentionPeriod > retentionDuration
This is a number that is defined by the retention type. For example, if retention duration is "9" and retention type is "Days", then the retention period is 9 days.
resultFilesRetentionPeriod > retentionType
Defines the unit of measure to be used for retention period: Days, Hours, Months, Weeks. Based on the configured retention period, the NetProbe will delete old scenario run folders based on the folder's timestamp.
Possible values:
Setting | Description |
---|---|
Days | Unit of measure is days. |
Hours | Unit of measure is hours. |
Weeks | Unit of measure is weeks. |
Months | Unit of measure is months. |
Prerequisites for Recording Scenarios
There are three components that need to be installed in order to record scenario scripts for EUEM:
- Mozilla Firefox
- Selenium IDE
- Geneos EUEM Firefox Plug-in
EUEM has been verified to work with Firefox version 14.0.1 and Selenium IDE version 1.8.1 up to 1.9.0.
Mozilla Firefox
Mozilla Firefox can be downloaded from http://www.mozilla.org/en-US/firefox/new/.
Installation is well-documented on the Mozilla website.
Selenium IDE
Selenium IDE is the primary tool for recording scenarios.
The Selenium IDE website is http://seleniumhq.org/projects/ide/. Selenium IDE can be downloaded via a link at the bottom right of the web page.
Installation is documented on the Selenium IDE website: http://seleniumhq.org/docs/02_selenium_ide.html#installing-the-ide
Geneos EUEM Firefox Plug-in
Follow these steps to install the Geneos EUEM Firefox plug-in:
- Open Mozilla Firefox.
- On the toolbar, select Tools > Add-ons. This will open the Add-ons Manager in a tab on the browser.
- Click the "Tools for all add-ons" button and select "Install Add-on From File".
- On the dialog box, navigate to the Geneos EUEM Firefox plug-in file (itrs-geneos-euem.xpi) and press Open. The EUEM Firefox plug-in should show up on the Firefox Add-ons list.
Note: The Geneos EUEM Firefox plug-in (itrs-geneos-euem.xpi) can be found under the "doc" folder of the Active Console installation folder.
Recording Scenario Scripts
Recording with Selenium IDE
To record a scenario script, follow these steps:
- On Mozilla Firefox, click Tools from the toolbar and select Selenium IDE. This will open Selenium IDE in a separate window, which by default will be in recording mode. You can verify this by holding the mouse pointer over the red record button on the upper right.
- On Firefox, navigate to the web page to be monitored and carry out the actions. Selenium IDE will record your actions as commands on the scenario script.
- When the scenario is completed, click the record button to stop Selenium IDE from recording.
- To save the scenario script, click File on the toolbar, select "Export Test Case As" and then select "Geneos EUEM Format" to save the script as a EUEM JSON file (*.geuem).
Note: This file can be loaded into Selenium IDE from the file system.
Inserting Explicit Commands
Not all commands are automatically recorded by Selenium IDE. Commands such as assertions and accessors are inserted manually by the user, either by using Selenium IDE or by using a plain text editor for the scenario script itself.
To insert an explicit command:
- Right-click on the script in Selenium IDE.
- Select "Insert New Command" from the context menu.
Note: The new command is inserted above the highlighted step.
- Select the command to insert using the Command dropdown or simply type it in. In the example below, assertText is inserted.
- The assertText command requires a parameter - a text pattern to assert against. On the Target text field, enter the text pattern to be used in the assertion. In this example, "Dashboard" is entered. This means that the scenario will assert the presence of "Dashboard" text on the web page.
Note: Commands can have as many as two parameters. The Target field is used for the first parameter, and Value is used for the second.
Using the Geneos EUEM Firefox Plug-in
When the Geneos EUEM Firefox Plug-in is installed in Firefox, a toolbar will appear in Selenium IDE:
The toolbar gives access to custom commands that will assist in recording scenario scripts for EUEM.
Button | Description |
---|---|
Copy to Clipboard |
Copies the script to the clipboard. You can paste the script into the GSE Script Editor. |
Set Viewport |
Sets the viewport of the browser. This is used to determine the dimensions of a screenshot. |
Take a Screenshot |
Takes a screenshot and places the image in the scenario run folder on the NetProbe. |
Capture as MHT |
Captures the current web page as a MHT archive file to be saved in the scenario run folder on the NetProbe. |
Login with Basic Authentication |
This is an alternate command to open a web page that has a username/password prompt. Selenium IDE cannot capture web pages with a login prompt - the script will timeout at the open() command. Note: When this command is used, you no longer need to use the open() command. |
Download File |
Inserts the custom command downloadFile(). The downloaded files are saved in the scenario run folder on the NetProbe. |
Encrypt Value Field |
Encrypts the value parameter on the highlighted step. This is useful for encrypting username and password. For example, the script below has an encrypted password field highlighted:
Clicking on the Encrypt Value Field button encrypts the value of the password:
When the script is copied into the clipboard, this field will be encrypted. The field is unencrypted prior to playback. Note: The Encrypt Value Field button works on any command with a value parameter. |
Scenario Script Format
Scenario scripts are saved in the NetProbe scenarios folder with an extension of *.geuem. Below is a simple example of a script that starts with a user performing a search for ITRS Group on google.com and navigating to the ITRS Group web site. It ends with the user clicking on the Products link.
"url": "http://www.google.com.ph/",
"scenario": "ITRS",
"noofsteps": 5,
"steps": [
{
"step": "open",
"target": "/",
"value": ""
},
{
"step": "type",
"target": "id=gbqfq",
"value": "ITRS Group"
},
{
"step": "click",
"target": "id=gbqfb",
"value": ""
},
{
"step": "click",
"target": "css=em",
"value": ""
},
{
"step": "clickAndWait",
"target": "link=Products",
"value": ""
}
]
}
The fields on the scenario script are described below.
The header section contains the following fields.
Field | Description |
---|---|
url | The base URL for the scenario. |
scenario | The name of the scenario. |
noofsteps | The total number of steps in the scenario. |
A scenario script then has "steps" in sequence, with the following fields per step.
Field | Description |
---|---|
step | The command being performed in the step. |
target | The first parameter for the command. It is typically used to indicate the target element on which the command is carried out. For example, if a button is clicked, the target is the ID of the button. |
value | The second parameter for the command. It is typically used for additional information for the command. For example, if the command is type(), the value would be the text that is typed by the user. |
cipher | This field is only included in the JSON file if encryption is used. It is used as a basis to decrypt back the value that was encrypted. |
Script Editor
The Script Editor allows the user to configure a Geneos EUEM script. This script can be copied from Selenium IDE and pasted into the Script Editor. The script format is JSON.
Note: The Script Editor checks for syntax of the JSON file.
Historical Result Files
The EUEM plug-in stores generated files and results of playback runs on the NetProbe directory.
Directory Structure
The EUEM folder is located in the plug-ins folder in the NetProbe installation.
The structure is as follows:
euem/
catalog/
sampler1/
_last/
gen/
runs/
<scenario1>/
<run1>/
<run2>/
<scenario2>/
scenarios/
sampler2/
…
Files and Folders
The following folders and files are found in the EUEM directory.
_last/Folder
This folder contains csv files with the latest run results for each scenario.
The following files are stored in this folder:
File | Description |
---|---|
Result file (*.result) |
This is a csv file that contains a subset of the JSON file that is picked up by the NetProbe and used for the dataview. It contains information on the last run. This file is overwritten on every run.
|
gen/ Folder
This folder contains generated executable JavaScript (*.js) files that can be run by PhantomJS.
File | Description |
---|---|
JavaScript files (*.js) | There is one *.js file corresponding to each *.geuem file in the scenarios folder. |
Scenario Run Folders
There is a sub-folder for each configured scenario under the runs/ folder. These folders are named based on their scenario names.
Under each scenario folder is a sub-folder for each playback run. The naming convention used for these folders is YYYY_MM_DDTHH_MM_SSZ, based on the start date and time of the execution of the script.
Several files are stored in this folder:
File | Description |
---|---|
Scenario Configuration file (scenario-common.config) | There is one configuration file for each scenario run folder. This file is not for editing by the user. It contains PhantomJS configuration information - such as proxy authentication, auto-proxy configuration, SSL configuration and other command line information for PhantomJS. This file exists because of a string length limitation in passing command line arguments to PhantomJS. |
HAR file (*.har) | This is a HTTP archive file used to save information on page elements. One HAR file is generated for each web page/URL accessed in the scenario. |
JSON Results File (*.json) | This is a JSON file that contains the complete data gathered by PhantomJS. |
MHT file (*.mht) | If the storeAsMHT() command is used in the scenario, there will be a MHT file in this folder. |
Screenshot (*.png, *jpeg, *.pdf) | If a screenshot is generated in the scenario, a screenshot file will be found in the folder. |
Downloaded file(s) | If the downloadFile() command is used, the downloaded file will be saved here. |
scenarios/ Folder
This folder contains the scenario scripts for the NetProbe.
File | Description |
---|---|
Scenario Script (*.geuem) | This is the scenario script generated from the EUEM Firefox plug-in. The scenario script is a JSON file. There is one file per scenario. |
Selenium Commands
There are three types of Selenium commands available in Selenium IDE: Actions, Accessors and Assertions. Each type of command is described below. There are over 500 Selenium commands, but only a subset, useful for monitoring, is supported by the Geneos EUEM plug-in.
Each command call has three elements:
- Command - the specific Selenium command, which can be an action, accessor or an assertion.
- Target - the page element on which the command will be performed. By convention, this is also the first parameter in a command. In Selenium, an element locator is a means of telling the command which page element is being referred to; it is an identifier.
- Value - the value of the user input. By convention, this is the second parameter in a command. For example, when using the type() command, the value is the text typed by the user.
Note: The use of target and value fields is very flexible and does not have to refer to element locators and values.
This section defines key terms to understand Selenium commands and lists the actions, accessors and assertions that are supported by EUEM.
Definitions
Actions
Actions are commands that generally manipulate the state of the application. They perform tasks that the user will carry out on a web page - for example, clicking a link or selecting an option. If an action fails, the execution of the current scenario is stopped.
Many actions have an "AndWait" suffix, for example, "clickAndWait". The "AndWait" suffix will cause the EUEM to make a call to the server and then wait for a new page to load.
Accessors
Accessors examine the state of the application and store the results in variables, e.g. "storeTitle". They are prefixed by "store" and are explicitly inserted by the user in a scenario script either by using the Selenium IDE or by manually manipulating the script itself. In EUEM, the variables are stored in the scenario run results file (JSON format).
Variables are found in a section of the .json file generated for each scenario run under the runs folder. For example:
"variables": {
"system": {
"url": "https://192.168.100.27/"
},
"user": {}
},
There are two parts to the variables section. The first is "system", where EUEM stores system variables. The system variables include the following:
- Base URL
- Scenario Name
- Total steps
- Passed step count.
System variables can be accessed in the value field for other commands or by using echo() with syntax "${system.variable}".
The second is "user", where EUEM stores variables specified by the user in a scenario script.
User variables can be accessed in the value field for other commands or by using echo() with syntax "${variable}".
Assertions
Assertions verify that the state of the application conforms to what is expected. They are similar to accessors in that they examine the state of the application. There are three modes of assertions:
- assert - commands with this prefix perform a hard assertion. This means that when an assert fails, the scenario is aborted.
- verify - commands with this prefix perform a soft assertion. This means that when a verify fails, the scenario continues execution and logs the failure.
- waitFor - commands with this prefix wait for some condition to become true. This is useful for AJAX applications. They will succeed immediately if the condition is already true. However, they will fail and halt the test if the condition does not become true within the current timeout setting.
Locator
An element locator tells EUEM which HTML element a command refers to - it is essentially an identifier. They are frequently used as attributes in Selenium commands. There are several ways of identifying a HTML element:
- Identifier/ID
- Name
- DOM
- Xpath
- CSS
This topic is discussed in the Selenium IDE documentation: http://seleniumhq.org/docs/02_selenium_ide.html
Behaviour
When using Selenium IDE to record scenario scripts, some Selenium commands are supported right out of the box. For example, if you click a button on a web page, Selenium IDE will record this as "click". Other commands are not directly supported.
The behaviour of each command is classified as follows:
- Automatically supported - the command is directly used by Selenium IDE. When interacting with a web page, Selenium IDE will use the command when appropriate.
- Explicit command - the command is not directly used by Selenium IDE. To use an explicit command, you will need to insert the command in the scenario script - either by using Selenium IDE or by hand.
- Alternate command - this is a command that can be used explicitly in place of the automatically supported command. For example, when checking a checkbox on a web page, Selenium IDE records this activity as a "click". Instead of click, you can replace this command with a "check" by using Selenium IDE or by hand.
Text Patterns
Many commands, particularly assertions, use text patterns as parameters. For example, assertText(locator, pattern). Pattern refers to the text pattern for the command to compare against.
EUEM supports an exact text match for use with these commands. This means that the text seen by the user on the web page is checked against the exact text entered for the command in the scenario. Whitespaces before and after text and special characters such as carriage returns, are removed prior to comparison.
Actions
This section lists the actions supported by EUEM.
This command adds a selection to the set of selected options in a multi-select element using an option locator.
Note: When you use this command to select a new option without holding down the Ctrl button, the previously selected option will become unselected and removeSelection() is automatically inserted.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator identifying a
multi-select box.
|
optionLocator |
An option locator (a label by default),
e.g. "Volvo" in the screenshot above.
|
Behaviour: Automatically supported.
This command saves the entire contents of the current window canvas to a PNG, JPEG, GIF or PDF file.
The screenshot is saved in the scenario run folder.
To adjust the size of a screenshot, use the setViewport() custom command.
There is a known limitation with saving a screenshot as a .jpeg or .jpg where a white background becomes black if the web page itself does not set a background attribute.
Arguments are:
Arguments | Description |
---|---|
filename |
The name of the file that contains the
screenshot. Since no filename extension
will be appended by default, the user will
need to supply it.
|
kwargs |
A kwargs string that modifies the way the
screenshot is captured. Example:
"background=#CCFFDD". The only currently
valid option is background.
|
Behaviour: Explicit command - can be accessed by pressing the button () on the Geneos EUEM Firefox plug-in.
This command checks a toggle-button (checkbox/radio button). By default, Selenium IDE inserts click() when a user checks a toggle-button.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator identifying either a
checkbox or radio button.
|
Behaviour: Alternate command.
This command clicks on a link, button, checkbox or radio button. If the click causes a new page to load (like a link usually does), insert a waitForPageToload() after this command.
Arguments are:
Arguments | Description |
---|---|
locator | An element locator identifying a page element. |
Behaviour: Automatically supported.
This command clicks on a link, button, checkbox or radio button. If the click causes a new page to load (as a link usually does), insert a waitForPageToload() after this command. Unlike the click() command, this command requires a coordinates string.
This command is only useful if the element's position is important.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator identifying a page
element.
|
coordString |
Specifies the x, y position (i.e. 10, 20)
of the mouse event relative to the element
returned by the locator.
|
Behaviour: Explicit command.
This command creates a new cookie whose path and domain are the same as those of the current page under test, unless you specified a path for this cookie explicitly.
The EUEM plug-in uses cookies in the context of a single session. During the session, a cookie is created and stored in memory until the session is completed.
Arguments are:
Arguments | Description |
---|---|
nameValuePair |
The name and value of the cookie using this
format: "name=value".
|
optionsString |
Options for the cookie. Currently supported
options include "path", "max_age" and
"domain". The optionString'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 seconds.
|
Behaviour: Explicit command.
deleteCookie(name, optionsString)
This command deletes a named cookie with the specified path.
Arguments are:
Arguments | Description |
---|---|
nameValuePair |
The name of the cookie to be deleted.
|
optionsString |
Options for the cookie. Currently supported
options include "path", "max_age" and
"domain". The optionString'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 seconds.
|
Behaviour: Explicit command.
echo(message)
This command enables you to print text. It can be used to insert comments or any custom notes. This command is also useful for showing the contents of variables. Variables can be accessed by the following naming convention: ${variable}.
Variables are stored in the results JSON file in the scenario run folder. The echo() command is a useful way to show the variable contents in the AC - it will be shown under the description column.
Arguments are:
Arguments | Description |
---|---|
message |
The text to show.
|
Behaviour: Explicit command.
This command moves the focus to the specified element; for example, if the element is an input field, this command moves the cursor to that field. Focus can be changed on a web page by pressing the tab button.
Note: Selenium IDE does not detect change of focus from one element to another.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
|
Behaviour: Explicit command.
This command simulates the user clicking the "back" button on the browser.
Note: Selenium IDE does not automatically capture pressing the "back" button on Firefox. If you want to simulate this functionality, you should insert the command manually.
This command has a limitation in that PhantomJS does not totally imitate browser behaviour for remembering entered fields on a form when a user goes back.
There are no arguments for this command.
Behaviour: Explicit command.
open(url)
This command opens a URL. It accepts both relative and absolute URLs. The "open" command waits for the page to load before proceeding, that is, the "AndWait" suffix is implicit.
The open() command is typically the first step in a scenario. It will load all the elements in a web page.
Arguments are:
Arguments | Description |
---|---|
url |
The URL to open; may be relative or
absolute.
|
Behaviour: Automatically supported.
pause(waitTime)
This command pauses running the scenario script for the specified amount of time (in milliseconds).
This command is very useful when inserted after a command that requires loading of resources; for example, when typing in a search combo box that will show a list of possible matches. The user will need to experiment with the wait time value. A value that is too short will cause the previous step to fail.
Arguments are:
Arguments | Description |
---|---|
waitTime |
The amount of time to sleep (in
milliseconds).
|
Behaviour: Explicit command.
refresh()
This command simulates the user clicking the "Refresh" button (or pressing F5) on the browser.
Selenium IDE does not capture the user pressing either F5 or the Refresh button.
There are no arguments for this command.
Behaviour: Explicit command.
removeAllSelections(locator)
This command unselects all of the selected options in a multi-select element. This will result in no option being selected.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator specifying a
multi-select box.
|
Behaviour: Explicit command.
This command removes a selection from the set of selected options in a multi-select element using an option locator.
Note: Selenium IDE inserts this command for the previously selected option when a new option is clicked without holding down the Ctrl button.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator identifying a
multi-select box.
|
optionLocator |
An option locator (a label by default).
|
Behaviour: Automatically supported
This command selects an option from a drop-down using an option locator, e.g. "Volvo" in the example below.
Option locators provide different ways of specifying options of an HTML Select element (for example, for selecting a specific option, or for asserting that the selected option satisfies a specification). There are several forms of Select Option Locator:
- label=labelPattern: matches options based on their labels, i.e. the visible text (this is the default). Example: label=regexp.
- value=valuePattern: matches options based on their values. Example: value=other.
- id=id: matches options based on their ids. Example: id=option1.
- index=index: matches an option based on its index (offset from zero). Example: index=2.
If no option locator prefix is provided, the default behaviour is to match on label.
Arguments are:
Arguments | Description |
---|---|
selectLocator |
An element locator identifying a drop-down
menu.
|
optionLocator |
An option locator (a label by default).
|
Behaviour: Automatically supported.
This command simulates keystroke events on a specified element. It is bound by the limitations of a real user - such as not being able to type into an invisible or read only elements. This command is useful for dynamic UI widgets (like auto-completing combo boxes) that require explicit key events.
The sendKeys() command is used in place of the type() command in situations where a key event is expected by a web page. For example, if pressing an Enter key is expected, the value argument should be "n". Simple text and special keys can be used in combination. For example, "passwordn" means that the word "password" was typed followed by the Enter key.
Unlike the type() command which forces the specified value into the page directly, sendKeys() does not replace existing content. If you want to replace the existent contents, you need to use the type() command to set the value of the field to empty string to clear the field, and then use the sendKeys() command to send the keystroke for what you want to type.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
|
value |
The key value to type.
|
Behaviour: Explicit command.
This command moves the text cursor to the specified position in the given input element or textarea. This method will fail if the specified element isn't an input element or textarea.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator pointing to an input
element or textarea.
|
position |
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.
|
setTimeout(timeout)
This command specifies the amount of time to wait for actions to complete.
Actions that require waiting include "open", "AndWait" and "waitFor" actions. The default timeout is 30 seconds.
This command works like an override for a step timeout within a scenario.
Arguments are:
Arguments | Description |
---|---|
timeout |
A timeout in milliseconds, after which the
action will return with an error.
|
Behaviour: Explicit command.
submit(formLocator)
Submits the specified form. This is particularly useful for forms without submit buttons, e.g. single-input "Search" forms.
Selenium IDE records click or clickAndWait by default when a Submit button is clicked.
Arguments are:
Arguments | Description |
---|---|
formLocator |
An element locator for the form you want to
submit.
|
Behaviour: Explicit command.
This command sets the value of an input field, as though you typed it in. For combo boxes, the value should be the value of the option selected, not the visible text.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for the input field.
|
value |
The text value to type.
|
Behaviour: Automatically supported.
This command is an alternate command for sendKeys() and is used in the same manner.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
|
value |
The key value to type.
|
Behaviour: Alternate command.
Note: typeKeys() is deprecated in Selenium in favour of sendKeys(). Selenium also supports sendKeys().
Accessors
This section lists accessors supported by EUEM.
store(expression, variableName)
This command is a synonym for storeExpression().
Arguments are:
Arguments | Description |
---|---|
expression |
The JavaScript expression to evaluate.
|
variableName |
The name of the variable in which the
result is to be stored.
|
Behaviour: Alternate command for storeExpression()
storeAttribute(attributeLocator, variableName)
This command gets the value of an element attribute and stores it in a variable.
Arguments are:
Arguments | Description |
---|---|
attributeLocator |
Is an element reference followed by an @
sign and then the name of the attribute,
e.g. "foo@bar" where "foo" is the element
reference and "bar" is the attribute.
|
variableName |
The name of the variable in which the
result is to be stored.
|
Behaviour: Explicit command.
storeBodyText(variableName)
This command gets the entire text of the web page and stores it in a variable.
Note: It stores the ENTIRE web page, including the DOCTYPE declaration.
Arguments are:
Arguments | Description |
---|---|
variableName |
The name of the variable in which the
result is to be stored.
|
Behaviour: Explicit command.
storeChecked(locator, variableName)
This command gets whether a toggle-button (checkbox/radio) is checked. It fails if the specified element doesn't exist or isn't a toggle button. It returns true if the checkbox is checked, otherwise false. Using this command, the only values stored in the variable are true or false.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator pointing to a checkbox
or radio button.
|
variableName |
The name of the variable in which the
result is to be stored.
|
Behaviour: Explicit command.
storeElementPresent(locator, variableName)
This command verifies that the specified element is somewhere on the page and returns true if the element is present, otherwise false. This is stored in a variable. Using this command, the only values stored in the variable are true or false.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator pointing to a page
element.
|
variableName |
The name of the variable in which the
result is to be stored.
|
Behaviour: Explicit command.
storeEval(script, variableName)
This command gets the result of evaluating the specified JavaScript snippet. The snippet may have multiple lines, but only the result of the last line will be returned.
Note: This command requires a JavaScript snippet to run. Compare this with storeExpression().
Arguments are:
Arguments | Description |
---|---|
script |
The JavaScript snippet to run.
|
variableName |
The name of the variable in which the
result of the eval() is to be stored.
|
Behaviour: Explicit command.
storeExpression(expression, variableName)
This command returns the specified expression and stores it in a variable.
Note: Unlike storeEval(), this command can have something other than a JavaScript snippet as the first parameter.
Arguments are:
Arguments | Description |
---|---|
script |
The expression to evaluate.
|
variableName |
The name of the variable in which the
result of the expression is to be stored.
|
Behaviour: Explicit command.
storeHtmlSource(variableName)
This command returns the entire HTML source between the opening <HTML> and closing </HTML> tags and stores this in a variable. This will return an entire web page including mark up and all the text.
Arguments are:
Arguments | Description |
---|---|
variableName |
The name of the variable to store the HTML
source for a web page.
|
Behaviour: Explicit command.
storeLocation(variableName)
This command gets the absolute URL of the current page and stores it as a variable. An absolute URL points directly to the web page.
Arguments are:
Arguments | Description |
---|---|
variableName |
The name of the variable to store the
absolute URL of the web page.
|
Behaviour: Explicit command.
storeSomethingSelected(selectLocator, variableName)
This command determines whether an option in a drop-down menu was selected. It stores whether or not something was selected in a variable, i.e. either true or false.
Arguments are:
Arguments | Description |
---|---|
selectLocator |
An element locator identifying a drop-down
menu.
|
variableName |
The name of the variable for storing
whether or not an option was selected from
a drop-down menu.
|
Behaviour: Explicit command.
storeTable(tableCellAddress, variableName)
This command stores the text from a cell of a table. The cellAddress syntax is tableLocator.row.column, where row and column start at 0.
Note: The command doesn't actually store the table; it stores the text of a table cell.
Arguments are:
Arguments | Description |
---|---|
locator |
A cell address, e.g. "foo.1.4" which
indicates table ID = foo, row = 2, column =
5.
|
variableName |
The name of the variable for storing the
text from a cell of a table.
|
Behaviour: Explicit command.
storeText(locator, variableName)
This command obtains the text of an element and stores in a variable. This works for any element that contains text. This command uses either the textContent (Mozilla-like browsers) or the innertText (IE-like browsers) of the element, which is the rendered text shown to the user.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
|
variableName |
The name of the variable to store the text
of an element.
|
Behaviour: Explicit command.
storeTextPresent(pattern, variableName)
Verifies that the specified text pattern appears somewhere on the rendered page shown to the user. Returns true if the pattern matches the text, otherwise false and stores the result in a variable.
Arguments are:
Arguments | Description |
---|---|
pattern |
A pattern to match with the text of the
page.
|
variableName |
The name of the variable to store the
result of the comparison.
|
Behaviour: Explicit command.
storeTitle(variableName)
This command stores the title of the current page in a variable. This is located between the <TITLE> </TITLE> tags.
Arguments are:
Arguments | Description |
---|---|
variableName |
The name of the variable to store the title
of the web page.
|
Behaviour: Explicit command.
storeValue(locator, variableName)
This command gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter) and stores it in a variable. For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
|
variableName |
The name of the variable to store the value
in.
|
Behaviour: Explicit command.
Assertions
This section lists assertions supported by EUEM.
assertAlert(pattern)
This command retrieves the message of a JavaScript alert generated during the previous action, or fails if there were no alerts.
Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume, the next action will fail.
JavaScript alerts that are generated in a page's onload() event handler are not supported.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text message of a JavaScript alert to
assert against.
|
Behaviour: Explicit command.
assertAlertNotPresent()
This command returns true if there is no JavaScript alert present, otherwise false.
There are no arguments for this command.
Behaviour: Explicit command.
assertAlertPresent()
This command returns true if there is a JavaScript alert present, otherwise false.
There are no arguments for this command.
Behaviour: Explicit command.
assertBodyText(pattern)
This command compares the text of a web page to a given text pattern. Since HTML body text can be quite long, this command is useful only for small web pages.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to compare the HTML body
text to.
|
Behaviour: Explicit command.
assertChecked(locator)
Asserts whether a toggle-button (checkbox/radio button) is checked. Returns true if the checkbox is checked, otherwise false. Fails if the specified element doesn't exist or isn't a toggle-button.
Arguments are:
Arguments | Description |
---|---|
locator |
Is an element reference pointing to a
checkbox or a radio button.
|
Behaviour: Explicit command.
assertElementPresent(locator)
This command asserts that the specified element is present somewhere on the web page. Returns true if the element is present, otherwise false.
Arguments are:
Arguments | Description |
---|---|
locator |
Is an element reference.
|
Behaviour: Explicit command.
assertLocation(pattern)
Obtains the absolute URL of the current page and compares it against the pattern supplied by the user.
Arguments are:
Arguments | Description |
---|---|
pattern |
The URL to assert against, for example:
http://www.google.com.
|
Behaviour: Explicit command.
assertSelectedId(locator, pattern)
This command asserts the id of a selected option of a dropdown.
Note: An option's id is found as an attribute in the HTML option tag.
For example:
<option id="de" value="dep">Deposit</option>
This command will fail when used on a dropdown with multiple selection enabled.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a dropdown.
|
pattern |
The text pattern to assert against the
selected id in the dropdown.
|
Behaviour: Explicit command.
assertSelectedIds(locator, pattern)
This command gets an array of all the selected ids from a multi-select dropdown and asserts this against a comma delimited text pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a multi-select
dropdown.
|
pattern |
The text pattern to assert against the
selected ids in the dropdown. This should
be entered as a comma delimited list in the
order they are found with no spaces between
the selected values. For example:
"buy,sell,hold".
|
Behaviour: Explicit command.
assertSelectedIndex(locator, pattern)
This command asserts the index of a selected option of a dropdown.
Note: The index is determined by the order of the option in the dropdown, with the count beginning with "0" (zero).
In this example, the Deposit option has an index of 0.
<select>
<option id="de" value="dep">Deposit</option>
<option id="wi" value="wit">Withdraw</option>
</select>
This command will fail when used on a dropdown with multiple selection enabled.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a dropdown.
|
pattern |
The text pattern to assert against the
selected index in the dropdown.
|
Behaviour: Explicit command.
assertSelectedIndexes(locator, pattern)
This command gets an array of all the selected indexes from a multi-select dropdown and asserts this against a comma delimited text pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a multi-select
dropdown.
|
pattern |
The text pattern to assert against the
selected indexes in the dropdown. This
should be entered as a comma delimited list
in the order they are found with no spaces
between the selected values. For example:
"0,1,2".
|
Behaviour: Explicit command.
assertSelectedLabel(locator, pattern)
This command asserts the label of a selected option of a dropdown.
Note: An option's label is visible to the user on the dropdown.
In this HTML snippet, "Deposit" is the label:
<option value="dep">Deposit</option>
This command will fail when used on a dropdown with multiple selection enabled.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a dropdown.
|
pattern |
The text pattern to assert against the
selected label in the dropdown.
|
Behaviour: Explicit command.
assertSelectedLabels(locator, pattern)
This command gets an array of all the selected labels from a multi-select dropdown and asserts this against a comma delimited text pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a multi-select
dropdown.
|
pattern |
The text pattern to assert against the
selected labels in the dropdown. This
should be entered as a comma delimited list
in the order they are found with no spaces
between the selected values. For example:
"buy,sell,hold".
|
Behaviour: Explicit command.
assertSelectedValue(locator, pattern)
This command asserts the value of a selected option of a dropdown.
Note: An option's value is found as an attribute in the HTML option tag.
For example:
<option value="dep">Deposit</option>
This command will fail when used on a dropdown with multiple selection enabled.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a dropdown.
|
pattern |
The text pattern to assert against the
selected value in the dropdown.
|
Behaviour: Explicit command.
assertSelectedValues(locator, pattern)
This command gets an array of all the selected values from a multi-select dropdown and asserts this against a comma delimited text pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a multi-select
dropdown.
|
pattern |
The text pattern to assert against the
selected values in the dropdown. This
should be entered as a comma delimited list
in the order they are found with no spaces
between the selected values. For example:
"buy,sell,hold".
|
Behaviour: Explicit command.
assertText(locator, pattern)
This command compares the text of an element to a given text pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
|
pattern |
The text pattern to which the element will
be compared.
|
Behaviour: Explicit command.
assertTextNotPresent(pattern)
This command asserts that the specified text pattern does not appear somewhere on the rendered page shown to the user. Returns true if the pattern does not match the text, otherwise false.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to match with the text of
the page.
|
Behaviour: Explicit command.
assertTextPresent(pattern)
This command asserts that the specified text pattern appears somewhere on the rendered page shown to the user. Returns true if the pattern matches the text, otherwise false.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to match with the text of
the page.
|
Behaviour: Explicit command.
assertTitle(pattern)
This command gets the title of the current web page and compares it against the pattern supplied by the user.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to assert against,
representing the title of the web page.
|
Behaviour: Explicit command.
assertValue(locator, pattern)
This command compares the value of an element with the supplied pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
|
pattern |
A text pattern to be compared against.
|
Behaviour: Explicit command.
assertVisible(locator)
This command checks the visibility of an element. Returns true if the element is visible, otherwise false. This command fails if the element is not present.
An element can be rendered not visible by setting the CSS "visibility" property to "hidden", or the "display" property to "none".
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
|
Behaviour: Explicit command.
verifyElementPresent(locator)
This command verifies that the specified element is somewhere on the page. Returns true if the element is present, otherwise false.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
|
Behaviour: Explicit command.
verifyEval(script, pattern)
This command retrieves the result of the evaluating JavaScript snippet. The snippet may have multiple lines, but only the result of the last line will be returned.
Arguments are:
Arguments | Description |
---|---|
script |
The JavaScript snippet to run.
|
pattern |
The text pattern to compare the result of
the JavaScript eval() against.
|
Behaviour: Explicit command.
verifyExpression(expression, pattern)
This command returns the result of the specified expression.
Note: Unlike verifyEval(), this command can have something other than a JavaScript snippet as the first parameter.
Arguments are:
Arguments | Description |
---|---|
expression |
The expression to run.
|
pattern |
The text pattern to compare the result of
the expression against.
|
Behaviour: Explicit command.
verifyNotTitle(pattern)
This command gets the title of the current web page and compares it with the pattern. Returns true if the title and pattern are not the same, false if they are the same.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to compare the title of
the web page against.
|
Behaviour: Explicit command.
verifySelectedId(locator, pattern)
This command verifies the id of a selected option of a dropdown.
Note: An option's id is found as an attribute in the HTML option tag.
For example:
<option id="de" value="dep">Deposit</option>
This command will fail when used on a dropdown with multiple selection enabled.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a dropdown.
|
pattern |
The text pattern to verify against the
selected id in the dropdown.
|
Behaviour: Explicit command.
verifySelectedIds(locator, pattern)
This command gets an array of all the selected ids from a multi-select dropdown and verifies this against a comma delimited text pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a multi-select
dropdown.
|
pattern |
The text pattern to verify against the
selected ids in the dropdown. This should
be entered as a comma delimited list in the
order they are found with no spaces between
the selected values. For example:
"buy,sell,hold".
|
Behaviour: Explicit command.
verifySelectedIndex(locator, pattern)
This command verifies the index of a selected option of a dropdown.
Note: The index is determined by the order of the option in the dropdown, with the count beginning with "0" (zero).
In this example, the Deposit option has an index of 0.
<select>
<option id="de" value="dep">Deposit</option>
<option id="wi" value="wit">Withdraw</option>
</select>
This command will fail when used on a dropdown with multiple selection enabled.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a dropdown.
|
pattern |
The text pattern to verify against the
selected index in the dropdown.
|
Behaviour: Explicit command.
verifySelectedIndexes(locator, pattern)
This command gets an array of all the selected indexes from a multi-select dropdown and verifies this against a comma delimited text pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a multi-select
dropdown.
|
pattern |
The text pattern to verify against the
selected indexes in the dropdown. This
should be entered as a comma delimited list
in the order they are found with no spaces
between the selected values. For example:
"0,1,2".
|
Behaviour: Explicit command.
verifySelectedLabel(locator, pattern)
This command verifies the label of a selected option of a dropdown.
Note: An option's label is visible to the user on the dropdown.
In this HTML snippet, "Deposit" is the label:
<option value="dep">Deposit</option>
This command will fail when used on a dropdown with multiple selection enabled.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a dropdown.
|
pattern |
The text pattern to verify against the
selected label in the dropdown.
|
Behaviour: Explicit command.
verifySelectedLabels(locator, pattern)
This command gets an array of all the selected labels from a multi-select dropdown and verifies this against a comma delimited text pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a multi-select
dropdown.
|
pattern |
The text pattern to verify against the
selected labels in the dropdown. This
should be entered as a comma delimited list
in the order they are found with no spaces
between the selected values. For example:
"buy,sell,hold".
|
Behaviour: Explicit command.
verifySelectedValue(locator, pattern)
This command verifies the value of a selected option of a dropdown.
Note: An option's value is found as an attribute in the HTML option tag.
For example:
<option value="dep">Deposit</option>
This command will fail when used on a dropdown with multiple selection enabled.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a dropdown.
|
pattern |
The text pattern to verify against the
selected value in the dropdown.
|
Behaviour: Explicit command.
verifySelectedValues(locator, pattern)
This command gets an array of all the selected values from a multi-select dropdown and verifies this against a comma delimited text pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a multi-select
dropdown.
|
pattern |
The text pattern to verify against the
selected values in the dropdown. This
should be entered as a comma delimited list
in the order they are found with no spaces
between the selected values. For example:
"buy,sell,hold".
|
Behaviour: Explicit command.
verifyText(locator, pattern)
This command gets the text of an element and compares it against a pattern. This works for any element that contains text. This command uses the rendered text shown to the user.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for an element with
rendered text.
|
pattern |
The text pattern to compare the text of the
element against.
|
Behaviour: Explicit command.
verifyTextNotPresent(pattern)
This command verifies that the specified text pattern does not appear somewhere on the rendered page shown to the user. Returns true if the pattern does not match the text, otherwise false.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to match with the text of
the page.
|
Behaviour: Explicit command.
verifyTextPresent(pattern)
This command verifies that the specified text pattern appears somewhere on the rendered page shown to the user. Returns true if the pattern matches the text, otherwise false.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to match with the text of
the page.
|
Behaviour: Explicit command.
verifyTitle(pattern)
This command gets the title of the current page and compares it against a pattern. This command refers to the text in the HTML title tag, for example <TITLE>Title text</TITLE>.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to compare against the
title of the page.
|
Behaviour: Explicit command.
verifyValue(locator, pattern)
This command gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter) and compares it against a pattern. For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not. This command returns the element value, or "on/off" for checkbox/radio elements.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
|
pattern |
The text pattern to compare against.
|
Behaviour: Explicit command.
verifyVisible(locator)
This command determines if the specified element is visible. An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one of its ancestors. This method will fail if the element is not present.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
|
Accessors
This section lists accessors supported by EUEM.
store(expression, variableName)
Behaviour: Explicit command.
waitForBodyText(pattern)
This command waits for the entire text of the page to evaluate to true against the supplied pattern before continuing.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to compare against.
|
Behaviour: Explicit command.
waitForChecked(locator)
This command gets whether a toggle-button (checkbox/radio) is checked. It fails if a specified element doesn't exist or isn't a toggle-button. Returns true if the checkbox is checked, otherwise false.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator pointing to a checkbox
or radio button.
|
Behaviour: Explicit command.
waitForCondition(script, timeout)
This command runs the specified JavaScript snippet repeatedly until it evaluates to true. The snippet may have multiple lines, but only the result of the last line is considered.
Arguments are:
Arguments | Description |
---|---|
script |
The JavaScript snippet to run.
|
timeout |
A timeout in milliseconds, after which this
command will return with an error.
|
Behaviour: Explicit command.
waitForElementPresent(locator)
This command verifies that the specified element is somewhere on the page. Returns true if the element is present, otherwise false.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
|
Behaviour: Explicit command.
waitForEval(script, pattern)
This command obtains the result of evaluating the specified JavaScript snippet. The snippet may have multiple lines but only the result of the last line will be returned.
Arguments are:
Arguments | Description |
---|---|
script |
The JavaScript snippet to run.
|
pattern |
A text pattern to match with the result of
the JavaScript snippet.
|
Behaviour: Explicit command.
waitForPageToLoad(timeout)
This command pauses the execution of the scenario script until an expected new page loads.
Arguments are:
Arguments | Description |
---|---|
timeout |
A timeout in milliseconds that EUEM will
wait for the web page to load.
|
Behaviour: Explicit command.
waitForText(locator, pattern)
This command gets the text of an element and compares it against a pattern. This works for any element that contains text. This command uses the rendered text shown to the user.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
|
pattern |
The text pattern to match with the text of
the page.
|
Behaviour: Explicit command.
waitForTextNotPresent(pattern)
This command verifies that the specified text pattern does not appear somewhere on the rendered page shown to the user. Returns true if the pattern matches the text, otherwise false.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to match with the text of
the page.
|
Behaviour: Explicit command.
waitForTitle(pattern)
This command gets the title of the current page - i.e. the text between <TITLE> and </TITLE> tags and compares it with a text pattern.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to match with the title of
the page.
|
Behaviour: Explicit command.
waitForValue(locator, pattern)
This command obtains the (whitespaced-trimmed) value of an input field (or anything else with a value parameter). For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not. The command returns the element value, or "on/off" for checkbox/radio elements.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
|
pattern |
The text pattern to compare with the
returned value of the page element.
|
Behaviour: Explicit command.
waitForVisible(locator)
This command determines if the specified element is visible. An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one of its ancestors. This method will fail if the element is not present. Returns true if the specified element is visible, false otherwise.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
|
Behaviour: Explicit command.
Custom Commands
The EUEM plug-in includes additional commands that are outside the standard set included with Selenium IDE. Custom commands, not being part of the standard set of Selenium commands, have a couple of limitations:
- Custom commands do not show up in the Selenium IDE commands dropdown.
- Custom commands do not have a reference (i.e. context sensitive documentation) when they are used in Selenium IDE.
Due to the first limitation, the Geneos EUEM Firefox plug-in has buttons for the user to insert these commands.
downloadFile(urlLocation, filename)
This command downloads a file from a given URL. The download file must follow the rules on cross domain file scripting which means this command cannot be used if the base URL for the scenario is different from the file.
Note: The downloadFile() command can also be used by selecting the option from the right-click context menu in Firefox while on the download link itself.
Arguments are:
Arguments | Description |
---|---|
urlLocation |
The full target URL for the file, e.g.
http://www.url.com/file.ext.
|
Filename |
The name of the file as it will be saved in
the scenario runs directory, for example,
downloadfile.ext.
|
Behaviour: Explicit command - can be called by pressing the Geneos EUEM Firefox plug-in button ().
loginWithBasicAuthentication(url, authenticationDetails)
This command opens a URL with basic authentication.
Use this command when authentication details are needed to enter a site and the straight recording from Selenium IDE (which will record a login as type() and click()) doesn't work.
Arguments are:
Arguments | Description |
---|---|
url |
URL of the target page.
|
authenticationDetails |
The authentication details for logging in.
This should be in {username}={password}
format. For example, admin=password.
|
Behaviour: Explicit command - can be called by pressing the Geneos EUEM Firefox plug-in button ().
setViewport(width, height)
This command sets the page viewport of the browser's window. This will determine the dimensions of the screenshot when catpureEntirePageScreenshot() is used.
Arguments are:
Arguments | Description |
---|---|
width |
The width of the viewport in pixels.
|
height |
The height of the viewport in pixels.
|
Behaviour: Explicit command - can be called by pressing the Geneos EUEM Firefox plug-in button ().
storeAsMHT(url, filename)
This command saves the current web page as a MIME HTML (*.mht), a web page archive format. This is saved in the scenario run folder on the Netprobe.
Arguments are:
Arguments | Description |
---|---|
url |
The full URL of the file.
|
filename |
The filename to save the file as.
|
Behaviour: Explicit command - can be called by pressing the Geneos EUEM Firefox plug-in button ().
Behaviour: Explicit command.
Assertions
This section lists assertions supported by EUEM.
assertAlert(pattern)
This command retrieves the message of a JavaScript alert generated during the previous action, or fails if there were no alerts.
Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume, the next action will fail.
JavaScript alerts that are generated in a page's onload() event handler are not supported.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text message of a JavaScript alert to
assert against.
|
Behaviour: Explicit command.
assertAlertNotPresent()
This command returns true if there is no JavaScript alert present, otherwise false.
There are no arguments for this command.
Behaviour: Explicit command.
assertAlertPresent()
This command returns true if there is a JavaScript alert present, otherwise false.
There are no arguments for this command.
Behaviour: Explicit command.
assertBodyText(pattern)
This command compares the text of a web page to a given text pattern. Since HTML body text can be quite long, this command is useful only for small web pages.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to compare the HTML body
text to.
|
Behaviour: Explicit command.
assertChecked(locator)
Asserts whether a toggle-button (checkbox/radio button) is checked. Returns true if the checkbox is checked, otherwise false. Fails if the specified element doesn't exist or isn't a toggle-button.
Arguments are:
Arguments | Description |
---|---|
locator |
Is an element reference pointing to a
checkbox or a radio button.
|
Behaviour: Explicit command.
assertElementPresent(locator)
This command asserts that the specified element is present somewhere on the web page. Returns true if the element is present, otherwise false.
Arguments are:
Arguments | Description |
---|---|
locator |
Is an element reference.
|
Behaviour: Explicit command.
assertLocation(pattern)
Obtains the absolute URL of the current page and compares it against the pattern supplied by the user.
Arguments are:
Arguments | Description |
---|---|
pattern |
The URL to assert against, for example:
http://www.google.com.
|
Behaviour: Explicit command.
assertSelectedId(locator, pattern)
This command asserts the id of a selected option of a dropdown.
Note: An option's id is found as an attribute in the HTML option tag.
For example:
<option id="de" value="dep">Deposit</option>
This command will fail when used on a dropdown with multiple selection enabled.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a dropdown.
|
pattern |
The text pattern to assert against the
selected id in the dropdown.
|
Behaviour: Explicit command.
assertSelectedIds(locator, pattern)
This command gets an array of all the selected ids from a multi-select dropdown and asserts this against a comma delimited text pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a multi-select
dropdown.
|
pattern |
The text pattern to assert against the
selected ids in the dropdown. This should
be entered as a comma delimited list in the
order they are found with no spaces between
the selected values. For example:
"buy,sell,hold".
|
Behaviour: Explicit command.
assertSelectedIndex(locator, pattern)
This command asserts the index of a selected option of a dropdown.
Note: The index is determined by the order of the option in the dropdown, with the count beginning with "0" (zero).
In this example, the Deposit option has an index of 0.
<select>
<option id="de" value="dep">Deposit</option>
<option id="wi" value="wit">Withdraw</option>
</select>
This command will fail when used on a dropdown with multiple selection enabled.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a dropdown.
|
pattern |
The text pattern to assert against the
selected index in the dropdown.
|
Behaviour: Explicit command.
assertSelectedIndexes(locator, pattern)
This command gets an array of all the selected indexes from a multi-select dropdown and asserts this against a comma delimited text pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a multi-select
dropdown.
|
pattern |
The text pattern to assert against the
selected indexes in the dropdown. This
should be entered as a comma delimited list
in the order they are found with no spaces
between the selected values. For example:
"0,1,2".
|
Behaviour: Explicit command.
assertSelectedLabel(locator, pattern)
This command asserts the label of a selected option of a dropdown.
Note: An option's label is visible to the user on the dropdown.
In this HTML snippet, "Deposit" is the label:
<option value="dep">Deposit</option>
This command will fail when used on a dropdown with multiple selection enabled.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a dropdown.
|
pattern |
The text pattern to assert against the
selected label in the dropdown.
|
Behaviour: Explicit command.
assertSelectedLabels(locator, pattern)
This command gets an array of all the selected labels from a multi-select dropdown and asserts this against a comma delimited text pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a multi-select
dropdown.
|
pattern |
The text pattern to assert against the
selected labels in the dropdown. This
should be entered as a comma delimited list
in the order they are found with no spaces
between the selected values. For example:
"buy,sell,hold".
|
Behaviour: Explicit command.
assertSelectedValue(locator, pattern)
This command asserts the value of a selected option of a dropdown.
Note: An option's value is found as an attribute in the HTML option tag.
For example:
<option value="dep">Deposit</option>
This command will fail when used on a dropdown with multiple selection enabled.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a dropdown.
|
pattern |
The text pattern to assert against the
selected value in the dropdown.
|
Behaviour: Explicit command.
assertSelectedValues(locator, pattern)
This command gets an array of all the selected values from a multi-select dropdown and asserts this against a comma delimited text pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a multi-select
dropdown.
|
pattern |
The text pattern to assert against the
selected values in the dropdown. This
should be entered as a comma delimited list
in the order they are found with no spaces
between the selected values. For example:
"buy,sell,hold".
|
Behaviour: Explicit command.
assertText(locator, pattern)
This command compares the text of an element to a given text pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
|
pattern |
The text pattern to which the element will
be compared.
|
Behaviour: Explicit command.
assertTextNotPresent(pattern)
This command asserts that the specified text pattern does not appear somewhere on the rendered page shown to the user. Returns true if the pattern does not match the text, otherwise false.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to match with the text of
the page.
|
Behaviour: Explicit command.
assertTextPresent(pattern)
This command asserts that the specified text pattern appears somewhere on the rendered page shown to the user. Returns true if the pattern matches the text, otherwise false.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to match with the text of
the page.
|
Behaviour: Explicit command.
assertTitle(pattern)
This command gets the title of the current web page and compares it against the pattern supplied by the user.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to assert against,
representing the title of the web page.
|
Behaviour: Explicit command.
assertValue(locator, pattern)
This command compares the value of an element with the supplied pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
|
pattern |
A text pattern to be compared against.
|
Behaviour: Explicit command.
assertVisible(locator)
This command checks the visibility of an element. Returns true if the element is visible, otherwise false. This command fails if the element is not present.
An element can be rendered not visible by setting the CSS "visibility" property to "hidden", or the "display" property to "none".
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
|
Behaviour: Explicit command.
verifyElementPresent(locator)
This command verifies that the specified element is somewhere on the page. Returns true if the element is present, otherwise false.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
|
Behaviour: Explicit command.
verifyEval(script, pattern)
This command retrieves the result of the evaluating JavaScript snippet. The snippet may have multiple lines, but only the result of the last line will be returned.
Arguments are:
Arguments | Description |
---|---|
script |
The JavaScript snippet to run.
|
pattern |
The text pattern to compare the result of
the JavaScript eval() against.
|
Behaviour: Explicit command.
verifyExpression(expression, pattern)
This command returns the result of the specified expression.
Note: Unlike verifyEval(), this command can have something other than a JavaScript snippet as the first parameter.
Arguments are:
Arguments | Description |
---|---|
expression |
The expression to run.
|
pattern |
The text pattern to compare the result of
the expression against.
|
Behaviour: Explicit command.
verifyNotTitle(pattern)
This command gets the title of the current web page and compares it with the pattern. Returns true if the title and pattern are not the same, false if they are the same.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to compare the title of
the web page against.
|
Behaviour: Explicit command.
verifySelectedId(locator, pattern)
This command verifies the id of a selected option of a dropdown.
Note: An option's id is found as an attribute in the HTML option tag.
For example:
<option id="de" value="dep">Deposit</option>
This command will fail when used on a dropdown with multiple selection enabled.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a dropdown.
|
pattern |
The text pattern to verify against the
selected id in the dropdown.
|
Behaviour: Explicit command.
verifySelectedIds(locator, pattern)
This command gets an array of all the selected ids from a multi-select dropdown and verifies this against a comma delimited text pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a multi-select
dropdown.
|
pattern |
The text pattern to verify against the
selected ids in the dropdown. This should
be entered as a comma delimited list in the
order they are found with no spaces between
the selected values. For example:
"buy,sell,hold".
|
Behaviour: Explicit command.
verifySelectedIndex(locator, pattern)
This command verifies the index of a selected option of a dropdown.
Note: The index is determined by the order of the option in the dropdown, with the count beginning with "0" (zero).
In this example, the Deposit option has an index of 0.
<select>
<option id="de" value="dep">Deposit</option>
<option id="wi" value="wit">Withdraw</option>
</select>
This command will fail when used on a dropdown with multiple selection enabled.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a dropdown.
|
pattern |
The text pattern to verify against the
selected index in the dropdown.
|
Behaviour: Explicit command.
verifySelectedIndexes(locator, pattern)
This command gets an array of all the selected indexes from a multi-select dropdown and verifies this against a comma delimited text pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a multi-select
dropdown.
|
pattern |
The text pattern to verify against the
selected indexes in the dropdown. This
should be entered as a comma delimited list
in the order they are found with no spaces
between the selected values. For example:
"0,1,2".
|
Behaviour: Explicit command.
verifySelectedLabel(locator, pattern)
This command verifies the label of a selected option of a dropdown.
Note: An option's label is visible to the user on the dropdown.
In this HTML snippet, "Deposit" is the label:
<option value="dep">Deposit</option>
This command will fail when used on a dropdown with multiple selection enabled.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a dropdown.
|
pattern |
The text pattern to verify against the
selected label in the dropdown.
|
Behaviour: Explicit command.
verifySelectedLabels(locator, pattern)
This command gets an array of all the selected labels from a multi-select dropdown and verifies this against a comma delimited text pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a multi-select
dropdown.
|
pattern |
The text pattern to verify against the
selected labels in the dropdown. This
should be entered as a comma delimited list
in the order they are found with no spaces
between the selected values. For example:
"buy,sell,hold".
|
Behaviour: Explicit command.
verifySelectedValue(locator, pattern)
This command verifies the value of a selected option of a dropdown.
Note: An option's value is found as an attribute in the HTML option tag.
For example:
<option value="dep">Deposit</option>
This command will fail when used on a dropdown with multiple selection enabled.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a dropdown.
|
pattern |
The text pattern to verify against the
selected value in the dropdown.
|
Behaviour: Explicit command.
verifySelectedValues(locator, pattern)
This command gets an array of all the selected values from a multi-select dropdown and verifies this against a comma delimited text pattern.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for a multi-select
dropdown.
|
pattern |
The text pattern to verify against the
selected values in the dropdown. This
should be entered as a comma delimited list
in the order they are found with no spaces
between the selected values. For example:
"buy,sell,hold".
|
Behaviour: Explicit command.
verifyText(locator, pattern)
This command gets the text of an element and compares it against a pattern. This works for any element that contains text. This command uses the rendered text shown to the user.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator for an element with
rendered text.
|
pattern |
The text pattern to compare the text of the
element against.
|
Behaviour: Explicit command.
verifyTextNotPresent(pattern)
This command verifies that the specified text pattern does not appear somewhere on the rendered page shown to the user. Returns true if the pattern does not match the text, otherwise false.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to match with the text of
the page.
|
Behaviour: Explicit command.
verifyTextPresent(pattern)
This command verifies that the specified text pattern appears somewhere on the rendered page shown to the user. Returns true if the pattern matches the text, otherwise false.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to match with the text of
the page.
|
Behaviour: Explicit command.
verifyTitle(pattern)
This command gets the title of the current page and compares it against a pattern. This command refers to the text in the HTML title tag, for example <TITLE>Title text</TITLE>.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to compare against the
title of the page.
|
Behaviour: Explicit command.
verifyValue(locator, pattern)
This command gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter) and compares it against a pattern. For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not. This command returns the element value, or "on/off" for checkbox/radio elements.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
Mandatory: Yes
|
pattern |
The text pattern to compare against.
Mandatory: Yes
|
Behaviour: Explicit command.
verifyVisible(locator)
This command determines if the specified element is visible. An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one of its ancestors. This method will fail if the element is not present.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
Mandatory: Yes
|
Behaviour: Explicit command.
waitForBodyText(pattern)
This command waits for the entire text of the page to evaluate to true against the supplied pattern before continuing.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to compare against.
Mandatory: Yes
|
Behaviour: Explicit command.
waitForChecked(locator)
This command gets whether a toggle-button (checkbox/radio) is checked. It fails if a specified element doesn't exist or isn't a toggle-button. Returns true if the checkbox is checked, otherwise false.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator pointing to a checkbox
or radio button.
Mandatory: Yes
|
Behaviour: Explicit command.
waitForCondition(script, timeout)
This command runs the specified JavaScript snippet repeatedly until it evaluates to true. The snippet may have multiple lines, but only the result of the last line is considered.
Arguments are:
Arguments | Description |
---|---|
script |
The JavaScript snippet to run.
Mandatory: Yes
|
timeout |
A timeout in milliseconds, after which this
command will return with an error.
Mandatory: Yes
|
Behaviour: Explicit command.
waitForElementPresent(locator)
This command verifies that the specified element is somewhere on the page. Returns true if the element is present, otherwise false.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
Mandatory: Yes
|
Behaviour: Explicit command.
waitForEval(script, pattern)
This command obtains the result of evaluating the specified JavaScript snippet. The snippet may have multiple lines but only the result of the last line will be returned.
Arguments are:
Arguments | Description |
---|---|
script |
The JavaScript snippet to run.
Mandatory: Yes
|
pattern |
A text pattern to match with the result of
the JavaScript snippet.
Mandatory: Yes
|
Behaviour: Explicit command.
waitForPageToLoad(timeout)
This command pauses the execution of the scenario script until an expected new page loads.
Arguments are:
Arguments | Description |
---|---|
timeout |
A timeout in milliseconds that EUEM will
wait for the web page to load.
Mandatory: Yes
|
Behaviour: Explicit command.
waitForText(locator, pattern)
This command gets the text of an element and compares it against a pattern. This works for any element that contains text. This command uses the rendered text shown to the user.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
Mandatory: Yes
|
pattern |
The text pattern to match with the text of
the page.
Mandatory: Yes
|
Behaviour: Explicit command.
waitForTextNotPresent(pattern)
This command verifies that the specified text pattern does not appear somewhere on the rendered page shown to the user. Returns true if the pattern matches the text, otherwise false.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to match with the text of
the page.
Mandatory: Yes
|
Behaviour: Explicit command.
waitForTitle(pattern)
This command gets the title of the current page - i.e. the text between <TITLE> and </TITLE> tags and compares it with a text pattern.
Arguments are:
Arguments | Description |
---|---|
pattern |
The text pattern to match with the title of
the page.
Mandatory: Yes
|
Behaviour: Explicit command.
waitForValue(locator, pattern)
This command obtains the (whitespaced-trimmed) value of an input field (or anything else with a value parameter). For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not. The command returns the element value, or "on/off" for checkbox/radio elements.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
Mandatory: Yes
|
pattern |
The text pattern to compare with the
returned value of the page element.
Mandatory: Yes
|
Behaviour: Explicit command.
waitForVisible(locator)
This command determines if the specified element is visible. An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one of its ancestors. This method will fail if the element is not present. Returns true if the specified element is visible, false otherwise.
Arguments are:
Arguments | Description |
---|---|
locator |
An element locator.
Mandatory: Yes
|
Behaviour: Explicit command.
Custom Commands
The EUEM plug-in includes additional commands that are outside the standard set included with Selenium IDE. Custom commands, not being part of the standard set of Selenium commands, have a couple of limitations:
- Custom commands do not show up in the Selenium IDE commands dropdown.
- Custom commands do not have a reference (i.e. context sensitive documentation) when they are used in Selenium IDE.
Due to the first limitation, the Geneos EUEM Firefox plug-in has buttons for the user to insert these commands.
downloadFile(urlLocation, filename)
This command downloads a file from a given URL. The download file must follow the rules on cross domain file scripting which means this command cannot be used if the base URL for the scenario is different from the file.
Note: The downloadFile() command can also be used by selecting the option from the right-click context menu in Firefox while on the download link itself.
Arguments are:
Arguments | Description |
---|---|
urlLocation |
The full target URL for the file, e.g.
http://www.url.com/file.ext.
Mandatory: Yes
Default: none
|
Filename |
The name of the file as it will be saved in
the scenario runs directory, for example,
downloadfile.ext.
You will need to provide the filename with an extension since Selenium IDE will be unable to recognize the file during recording.
Mandatory: Yes
Default: none
|
Behaviour: Explicit command - can be called by pressing the Geneos EUEM Firefox plug-in button ().
loginWithBasicAuthentication(url, authenticationDetails)
This command opens a URL with basic authentication.
Use this command when authentication details are needed to enter a site and the straight recording from Selenium IDE (which will record a login as type() and click()) doesn't work.
Arguments are:
Arguments | Description |
---|---|
url |
URL of the target page.
|
authenticationDetails |
The authentication details for logging in.
This should be in {username}={password}
format. For example, admin=password.
|
Behaviour: Explicit command - can be called by pressing the Geneos EUEM Firefox plug-in button ().
setViewport(width, height)
This command sets the page viewport of the browser's window. This will determine the dimensions of the screenshot when catpureEntirePageScreenshot() is used.
Arguments are:
Arguments | Description |
---|---|
width |
The width of the viewport in pixels.
Mandatory: Yes
Default: 400
|
height |
The height of the viewport in pixels.
Mandatory: Yes
Default: 300
|
Behaviour: Explicit command - can be called by pressing the Geneos EUEM Firefox plug-in button ().
storeAsMHT(url, filename)
This command saves the current web page as a MIME HTML (*.mht), a web page archive format. This is saved in the scenario run folder on the Netprobe.
Arguments are:
Arguments | Description |
---|---|
url |
The full URL of the file.
Mandatory: Yes
Default: none
|
filename |
The filename to save the file as.
Mandatory: Yes
Default: none
|
Behaviour: Explicit command - can be called by pressing the Geneos EUEM Firefox plug-in button ().
Unsupported Commands
Not all commands available in Selenium IDE are supported by the EUEM plug-in. Selenium IDE will not prevent the user from using an unsupported command.
EUEM will warn you about the use of unsupported commands in two ways:
- A warning popup on using the Copy to Clipboard button.
- A comment on the Geneos EUEM JSON script. For example:
{
"comment": "*** UNSUPPORTED COMMAND ***",
"step": "allowNativeXpath",
"target": "",
"value": ""
},
Unsupported commands will show up as a failed step when the scenario is run, but does not stop the scenario run.
Unsupported Commands
Not all commands available in Selenium IDE are supported by the EUEM plug-in. Selenium IDE will not prevent the user from using an unsupported command.
EUEM will warn you about the use of unsupported commands in two ways:
- A warning popup on using the Copy to Clipboard button.
- A comment on the Geneos EUEM JSON script. For example:
{
"comment": "*** UNSUPPORTED COMMAND ***",
"step": "allowNativeXpath",
"target": "",
"value": ""
},
Unsupported commands will show up as a failed step when the scenario is run, but does not stop the scenario run.