LogoLogo
WEM ModelerWEM ReferenceTutorialsMyWEM
  • WEM Platform Documentation
  • Getting Started
    • Introducing WEM
    • Create WEM Account
    • WEM Login
    • MyWEM Portal
      • MyWEM Features
      • MyWEM Support
      • Allow Support Access
    • Partner Portal
  • WEM Modeler
    • Introducing the WEM Modeler
    • Modeler Start Page
    • Manage Projects & Workspaces
    • User Roles Scheme
    • Create a new Project
    • Modeler Application Overview
    • Project Settings
      • Project Configuration
      • Security Settings
      • Portal Settings
      • SMTP Settings
      • Mobile App Settings
    • Expression Editor
    • Flowcharts
      • User Interaction
      • End Node
      • Sub-flowchart
      • Navigation
      • Clear session
      • Decision
      • Assignment
      • List Action
      • Loop
      • Copy Data
      • Save and Discard
      • Import Data
      • Export Data
      • Invoke Webservice
      • HTTP Request
      • Execute Process
        • Different processes explained
        • Send Email
        • Change settings
        • Changing files
        • Generate File
      • Ping server
      • Authenticate
      • Comet Messages
      • OpenAI
      • Async Tasks
      • Note Node
    • Data Model
      • WEM Session Folder
    • Services and Integration
      • Webservices
      • Remote Data Sources
      • Authentication Providers
        • SAML 2.0
          • SAML App Registration in EntraID
        • OAuth 2.0
      • Comet - Real Time Messages
      • Certificates
    • Concepts and Concept Queries
      • Concepts
      • Concept Queries
      • Concept Relations
    • Navigation
      • HTTP Endpoints
      • Tasks
    • Files and Assets
      • Widget Libraries
      • Template Fragments
      • Files
      • Hyperlinks
    • Multilanguage Dictionary
    • Agentic AI
      • WEM AI Agent
      • AI Flowchart Nodes
      • AI User Interaction
    • WEM Preview
    • WEM Runtime
      • Publishing Process
      • Staging
      • Live
    • Debugging
  • Template Editor
    • Interaction Template Editor
      • Interaction Template Hotkeys
    • General and preview
    • Style
      • Heading Type
      • Paragraph Style
      • Text Styling
      • Alignment
      • Hyperlink
      • Tooltip
    • Layout
      • Adaptive columns
      • Div
      • Panel
      • Alert
      • Table
      • Image
      • Icon
      • Label
    • Interaction
      • Form
      • Validation
      • Required field
      • Button
      • Dropdown
      • Free form item
    • Miscellaneous
      • Tabbar
      • Google maps
      • Nested template
      • Script
      • Reference
      • Conditional
      • Data grid
      • Repeater
      • Rich text
      • Custom
    • WMT Tool
  • WEM Reference
    • WEM Expressions Reference
    • Functions
      • Aggregation
        • Average
        • Count
        • First
        • Last
        • Max
        • Min
        • Sum
      • Concepts
        • ConceptId
        • Description
        • FindConcepts
        • GetAncestors
        • GetChildren
        • GetDescendants
        • GetParent
        • Intersection
        • LocalName
        • Synonyms
        • ToConcept
        • Union
      • Date
        • Date
        • DateDiff
        • DateOnly
        • DatePart
        • DayOfWeek
        • FromUnixTimestamp
        • MoveDate
        • Now
        • TimeOfDay
        • Today
        • ToDuration
        • ToLocal
        • ToUnixTimestamp
        • ToUTC
        • UTCNow
        • UTCToday
      • Environment
        • ApplicationId
        • CountryCode
        • CountryName
        • Hostname
        • IpAddress
        • IsFirstRequest
        • IsHttps
        • IsPreview
        • IsStaging
        • IsLive
        • NodeTrail
        • PortalId
        • PortalName
        • ProjectId
        • ProjectName
        • ProjectVersion
        • Setting
        • UrlPath
      • Files
        • FileName
        • FileSize
        • FileUrl
        • MimeType
      • Lists
        • Distinct
        • IsNewRow
        • IsOnRow
        • List
        • NameOf
        • RowId
      • Math
        • Abs
        • Ceiling
        • Cos
        • Distance
        • Exp
        • Floor
        • Log
        • Log10
        • Pi
        • Pow
        • Random
        • Round
        • Sin
        • Sqrt
        • ToNumber
      • Security
        • AesDecrypt
        • AesEncrypt
        • AesIv
        • AesKey
        • CreateJsonWebTokenH256
        • HmacSha256
        • Md5
        • Password
        • PasswordStrength
        • Pbkdf2
        • Sha1
        • Sha256
        • Totp
      • Text
        • AsText
        • Base32ToText
        • Base64ToText
        • CompareFuzzy
        • Concat
        • Contains
        • FormatDate
        • FormatDuration
        • FormatNumber
        • Guid
        • HexToText
        • HtmlAttributeEncode
        • HtmlEncode
        • IndexOf
        • JavascriptEncode
        • JsonEncode
        • Length
        • Padl
        • Padr
        • RegExIsMatch
        • RegExMatches
        • RegExReplace
        • Replace
        • Split
        • StringPart
        • SubString
        • ToBase32
        • ToBase64
        • ToBase64Url
        • ToHex
        • ToLower
        • ToRichText
        • ToString
        • ToTitleCase
        • ToUpper
        • Trim
        • UrlDecode
        • UrlEncode
        • XmlAttributeEncode
        • XmlEncode
        • XPath
        • XPathList
        • XPathNumber
      • Validation
        • HasValue
        • IsEmpty
        • IsKnown
        • IsUnknown
        • IsValidBankaccount
        • IsValidBSN
        • IsValidBTW
        • IsValidEmailAddress
        • IsValidIBAN
        • IsValidPhonenumber
        • IsValidURL
      • Localization
        • AvailableLanguages
        • CurrentLanguage
        • CurrentTimezone
        • LanguageStrategy
        • Languages in WEM
    • Keywords
      • Contains
      • Concepts
        • Ancestor of
        • Child of
        • Concept
        • Descendant of
        • Overlaps
        • Range of
        • Parent of
        • Contains
      • Environment
        • ApplicationRoot
        • Platform
      • Lists
        • In
        • Of
        • Where
        • Contains
        • All
      • Logic
        • And
        • Not
        • Or
        • Choose
        • If Then Else
      • Mobile
        • BatteryLife
        • BuildVersion
        • ConnectivityTypes
        • DeviceId
        • DeviceName
        • IsDevelopmentBuild
        • IsDistributionBuild
      • Text
        • Contains
        • Ends with
        • NewLine
        • Starts with
    • Operators
      • Addition +
      • Division /
      • Equality =
      • Equality-strong ==
      • Greater-than >
      • Greater-than-or-equal >=
      • If-unknown ?
      • Inversion -
      • Less-than <
      • Less-than-or-equal <=
      • Logical-and &, and
      • Logical-not !, not
      • Logical-or |, or
      • Modulo %
      • Multiplication *
      • Power ^
      • Subtraction -
      • Unequality <>
    • Data Types
      • Text
      • Number
      • Yes / No (Boolean)
      • Date Time
      • Duration
      • File
      • Rich Text
      • Concept
      • Conceptset
      • Reference
    • SQL Compatibility
      • Functions
      • Keywords
      • Operators
    • Content Security Policy
    • WEMScript for Custom HTML
    • WEM Widgets
      • WEM Widget Structure
      • WEMScript for Widgets
      • Widget Editor
      • Content Placeholder
    • WMT
      • File Structure
      • Basic Functional Template
      • Styling
      • Font Icons
      • Reference
        • Breadcrumb
        • Button Bar Buttons
        • Common Scripts
        • Common Styles
        • Conditional
        • Content
        • CSP
        • CSP Nonce
        • Expression
        • Hidden Fields
        • Language Select
        • Navigation
        • Node ID
        • Node Name
        • Placeholder
        • Placeholder Conditional
        • Startup Scripts
        • Template Fragment
        • Uses
    • Regression Test Framework
      • WEM Test Script
  • Tutorials
    • Tutorials
      • Making a Change Log
      • Placeholders for end-users
    • First Application
      • Expand First Application
    • Video Tutorials
      • By Partners
      • Security
    • Building Widgets
      • Basics
        • 1. Introduction
        • 2. Hello, World!
        • 3. General
        • 4. Properties
        • 5. Events
        • 6. Styling
        • 7. View State
        • 8. Resources
        • 9. Placeholders
        • 10. Template Editor Script
        • 11. Global Scope
        • 12. Risks and Responsibilities
        • 13. Conclusion
      • In-depth
        • 1. Introduction
        • 2. Platform Availability
        • 3. Development Workflow
        • 4. Properties
        • 5. View state
          • 1. Runtime.viewState
          • 2. sessionStorage
          • 3. Summary
        • 6. Styling
        • 7. Events
          • 1. Navigation
          • 2. Row position
      • WEMscript
        • 1. Introduction
        • 2. Variables
        • 3. Properties
        • 4. OutputId()
        • 5. Register Input - Required
        • 6. Encoding
        • 7. Script Block - Introduction
        • 8. Types
          • 1. Boolean
          • 2. Concept
          • 3. ConceptSet
          • 4. Datetime
          • 5. Duration
          • 6. File
          • 7. Number
          • 8. Richtext
          • 9. Text
        • 9. Script Block - Global Scope
        • 10. Script Block - ES Modules
        • 11. CSS - attachShadow
      • Examples
  • Tips and Tricks
    • Tips and Tricks
      • Keyboard Shortcuts
      • Video's in WEM
      • Extracting text from File
    • Custom Hostnames
    • FAQ
    • Expressions
      • Order of Operators
    • Processes
      • Email Process
      • Tips for creating PDF's
      • ZIP Archive Process Node
    • Concepts
      • Concepts and Runtime
    • Working with data
      • The Power of the Calculated Field
      • Consuming your OData source with Excel 2016
      • Expose your data via OData
      • Using OData to transfer data between runtimes
      • WEM Storage Options
    • Integration
      • Integrating external systems
      • Json
      • Single Sign-on
      • Office365 Integration
    • Performance
      • Performance Tips
      • Performance Profiler
      • Template Performance Profiler
      • The Split Loop
    • Security
      • 2FA with TOTP
      • Blacklist or whitelist IP addresses
    • Widgets
      • Advanced Charts
        • Boxplot Chart
        • Brush Chart
        • Bubble Chart
        • Candlestick Chart
        • Card with Chart
        • Effect Scatter Chart
        • Heat Map
        • Line, Area and Bar Chart
        • Map-Bar Morph
        • Mix Time Line Chart
        • Nested Pie Chart
        • Polar Area Chart
        • Polar Bar Chart
        • Profit Chart
        • Radial Bar Chart
        • Radial Bar Gauge
        • Range Bar Chart
        • Rosetype Pie Chart
        • Sankey Energy Chart
        • Scatter Chart
        • Scatter-Aggregate-Bar Chart
        • Stacked Columns Chart
        • Stepline Chart
        • Treemap
      • Advanced Input
        • Color Picker
        • Conceptset Image Selector
        • Google maps locator
        • Multi select input button
        • MultiFile Upload
        • On/Off switch
        • Process Arrow Steps
        • Rate
        • Rating view
        • Single select input button
        • Slider
        • Tree
      • Template Actions
        • Follow exit
      • Global widgets
        • Agenda
        • Audio Player
        • Calendar
        • Draw Signature
        • Grid Widget
        • Image capture
        • Kanban Board
        • Path
        • Progress Bar
        • reCAPTCHA
        • Timeline
      • Document widgets
        • Json Viewer
        • PDF Viewer
    • Various
    • Go to MyWEM
Powered by GitBook
On this page
  • Statements
  • Assignment
  • Screenshot
  • Navigate
  • Click
  • Hover
  • Select
  • Enter
  • Capture
  • Wait
  • Download
  • Resize
  • While
  • If
  • Expressions
  • <element> In
  • Logical Or
  • Logical And
  • Logical Not
  • Compare = , !=
  • Compare < , > , >= , <=
  • Calculation + , - , * , /
  • Elements
  • WebElements
  • Literals:
  • Other:
  • Examples
  • Perform clicks on buttons
  • Perform sorting on datagrid
  • Download a file
  • Form Input
  • Change Language

Was this helpful?

Export as PDF
  1. WEM Reference
  2. Regression Test Framework

WEM Test Script

a.k.a. Flint-Script

This part is a limited first edition to describe some of the WEM Test Script DSL features as part of the WEM Regression Test Framework.

In future, we plan to provide a Portal in which you can manage your own testsuites and scripts, request test-executions and review test-results. This WEM Test Script will be an important part.

Statements

Statements that can be used in the WEM Test Scripts to perform specific actions.

Assignment

Use := to assign an expression/value or a web element (an element on your page in the Runtime to work with) to a local variable.

$<variable-name> := <expr>
$<variable-name> := <webEl>

Screenshot

Make a screenshot of the current page. Screenshots will be compared to check differences between the test environment and the reference environment.

screenshot <name>
screenshot

If no name is given, a default name will be used like: "#-screenshot".

The resulting screenshots can be accessed in the Artifacts collection of the Job Execution Result.

Navigate

Navigate to a specified page (perform an HTTP-GET request).

navigate to <page>

The <page> value will be added to the end of the given base URL (test/reference host + relative path). If <page> starts with https:// or http://, the base URL will be ignored and <page> will be considered an absolute path (which may be an external URL).

Every script should start with a Navigate to statement.

Click

Perform a Click-action on specified (web) element.

click on <webEl>

Hover

Hover over a web element, to test tooltips.

hover over <webEl>

Select

Select value or text from specified web element, like a dropdown.

select <value> from <webEl>
select text <value> from <webEl>
select value <value> from <webEl>

Optional keyword text or value, determines which attribute is used for <value>, default is text.

Enter

Put a value into specified web element, most useful to perform adding values to Input Fields.

enter <value> into <webEl>

Capture

Capture text or html of specified web element.

capture <webEl> <name>
capture text <webEl>
capture html <webEl>

Optional keyword text or html, determines whether outer-html or text is captured, default is text.

Wait

Wait for a duration specified in milliseconds. This may be required if certain actions (loading a page, retrieving data) take a longer time. With Test Automation it is sometimes necessary to put in manual wait statements to make sure that the test can perform realistically and this means to have to wait until some longer running process is finished before the next step should be executed. Often this is a matter of trying a few times until the optimal waiting time is found...

wait <millisec>

Download

Tries to download specified link.

Use Wait at the end of the script if it's a big download.

Download does not work in Edge browser.

Download "<link>"

The <link> parameter should be the Text attribute of the link (the visible text that is clickable).

The resulting file can be accessed in the Artifacts collection of the Job Execution Result.

Resize

Resize browser viewport (to test responsive elements) to indicated width and height. When no arguments are present it will revert back to full screen. If height is not present, the width-value will be used for height as well.

Resize
Resize <width>
Resize <width> <height>

While

Continues executing statement block while <condition> is true.

while <condition>
...
break
...
end

Keyword end specifies end of statement block. Optional keyword break, if this is reached, the loop is ended and flow continues after the end.

If

If <condition> is true, executes statement block.

if <condition>
...
elseif <condition>
...
else
...
end

Keyword end specifies end of statement block. Optional keyword elseif, if previous conditions are false, execute the statements in the elseif block, if its specified condition is true. Optional keyword else, if previous conditions are false, execute the statements in the else block.

Every new statement should be on a new line.

Expressions

<element> In

Get the web element in another web element.

click on <webEl> in <webEl>

Logical Or

Check if one or the other is true.

if <condition> or <condition>
...
end

Logical And

Check if both are true.

while <condition> and <condition>
...
end

Logical Not

Negates expression.

if not <expr>
...
end

Compare = , !=

Compare values with each other. Equal (=) or Not-Equal (!=)

if <expr> = <expr>
...
end

Compare < , > , >= , <=

Check if values are greater or less than (or equals).

while <expr> >= <expr>
...
end

Calculation + , - , * , /

Calculation symbols.

$var := 1 + 2
$var := 1 * 2 - 3
$var := "Hello " + "world"
$var := "I am " + 42 + "years old"
$var := -$var

If + is used with a string, it concatenates all values into a string.

Elements

WebElements

WebElements are html elements that can be interacted with using the above named statements.

  • Button

  • Panel

  • Input

  • FormItem

  • Tab

  • Link

  • DataGrid (class=table)

  • Pagination

  • Element

To click on a datagrid or repeater "page", use the Pagination element: click on pagination[text=42]

Using selectors, the correct WebElement can be specified. If no selectors are present the first displayed element will be used.

Selectors available are: text, title, class, label, index and all html attributes. Index is a special selector, starting from 1 it chooses the element on the given index All other selectors after index will be ignored.

A special WebElement is Element. It has it's own special selectors, all other selectors won't work. These selectors are: id, xpath and css.

To avoid a "stale" WebElement exception (the specified element is no longer part of the current HTML Document in the Browser Session) use * in front of the WebElement to create a lazy expression, this will execute the expression only when needed. Only works on WebElements.

$var := button
$var := button[]
$var := button[class="succes", index=3, text="Ok"] #text="Ok" will not be reached
$var := *button[attr=<expr>, ...] #lazy webelement expression

Literals:

  • Boolean (true or false)

  • Number

  • String

Other:

  • $Variable

  • Function(<expr>, ...)

  • Exists(<webEl>) Checks if <webEl> hasn't gotten stale and still exists in the current HTML Document. Returns true or false.

Functions always have a return value

Examples

Perform clicks on buttons

A lazy assignment of a button element to a variable using index as a selector. Using the function Exists() to check if the current button is still valid, and increasing the index selector by 1 to loop through all button elements on the page. Making a screenshot of all overlays and closing them using click on button[text="close"].

navigate to "/data/legacy-lists"
screenshot "legacy-lists"

$i := 1
$button := *button[index=$i]
while (Exists($button))

	click on $button
	screenshot "test_" + $i

	click on button[text="close"]
	$i := $i + 1
end

Perform sorting on datagrid

Using click on datagrid[title="ID"] to sort specified columns of a Datagrid.

navigate to "/data/advanceddatatests"
screenshot

click on button[text="Test Filters"]
click on button[text="Test Filter 4: FilteredPaging"]
wait 1500
screenshot

click on datagrid[title="ID"]
screenshot "Sort ID"

click on datagrid[title="Count Orgs"]
wait 3000
screenshot "Sort Orgs"

click on pagination[text=11] in panel
screenshot "Page 11"

click on pagination[text="next"]
screenshot "Page Next"

Download a file

navigate to "/flowcharts/export-to-excel"

download "export.xls"
wait 500

Form Input

Entering "hello world" into a form-item. Afterwards collapsing the panel.

navigate to "/ui/input-components"

click on button[text="Texts"]
screenshot "inputs"

enter "hello world" into formitem[label="Text 03"] in panel
screenshot

click on panel
screenshot

Change Language

Change language to Italian using the dropdown and capturing the html of a web element.

navigate to "/ui/built-in-components"

click on button[text="Labels"]
screenshot "labels"

$table := *element[css="body>form>main>div:nth-child(5)"]

select "Italian (Italy)" from input[name="wmtlang"]
capture html $table
PreviousRegression Test FrameworkNextTutorials

Last updated 5 months ago

Was this helpful?

Overlays
Sorting datagrid
Enter values into form-input