MXML Reference
Updated Jul 2026

Documentation › MXML Language Reference

MXML Language Reference

Reference  MXML — MaxTAF's XML test language for IBM Maximo.

MXML (MaxTAF XML) is a compact, tag-based language purpose-built for testing IBM Maximo. It transpiles to Java and runs on Selenium, but hides the boilerplate and handles Maximo's quirks — iframes, dirty-record prompts, required/readonly field validation — behind clean tags like <ui:click> and <ui:assertValue>. Most MXML cases are produced by the recorder or an AI test case; this page is for reading, editing and hand-writing them.

On this page

How MXML transpiles

Every MXML tag has an associated Java template defined in MaxTAF's schema (XSD). At run time the engine walks the MXML tree and, for each tag, substitutes its attributes ($attr) and content ($content) into that template, assembling a standard JUnit-style Java test class. Tags that act on an element take one locator child (e.g. <ui:id>) which declares the Selenium By used by the surrounding action.

You don't need to see the Java — but MaxTAF shows it: a case's Script tab has MXML | JAVA sub-tabs so you can author in MXML and inspect the transpiled Java side by side.

The case skeleton

An MXML case is a <testCase> root declaring the namespaces it uses, with three lifecycle blocks. The ui namespace (xmlns:ui="http://www.maxtaf.com/ui") holds the UI/Maximo actions.

<testCase name="MyCaseName"
    xmlns="http://www.maxtaf.com"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ui="http://www.maxtaf.com/ui">

  <beforeTestCase>
    <initializeApi />
    <ui:createDriver>
      <ui:timeout>20</ui:timeout>
    </ui:createDriver>
    <ui:javaScriptExecutor />
    <addReporter type="xml" name="Test Title" description="Test Description"
                 class="Test Class" author="Author" />
  </beforeTestCase>

  <test name="testMyCaseName">
    <addTestReport name="testMyCaseName" />
    <ui:maximizeWindow />

    <native>driver.get(mxService.getParam("mx.maximo.address"))</native>
    <ui:click>
        <ui:id>toolactions_INSERT-tbb_anchor</ui:id>
    </ui:click>
    <ui:clear><ui:id>md3801d08-tb</ui:id></ui:clear>
    <ui:sendKeys text="Pump repair"><ui:id>md3801d08-tb</ui:id></ui:sendKeys>
    <ui:assertValue value="WAPPR"><ui:id>STATUS@483</ui:id></ui:assertValue>

    <testReportStatus>PASSED</testReportStatus>
  </test>

  <afterTestCase>
    <ui:close />
    <closeReporter />
  </afterTestCase>
</testCase>
Report status semantics

The report status starts as FAILED. A failed assertion keeps it FAILED and fails the test; a clean run sets it to PASSED at the end, and <closeReporter/> writes the final value.

Structural & reporting tags

TagPurpose
<testCase name>Root element; declares namespaces.
<beforeTestCase> / <afterTestCase>Set-up / teardown blocks. <beforeTest> / <afterTest> are per-test hooks.
<test name>The test body (a JUnit test method).
<initializeApi/>Sets up the MaxTAF API service (mxService).
<addReporter name description class author type>Registers the test reporter.
<addTestReport name>Starts a report section and its step counter.
<addReportLine action expected actual status>Adds a narration line to the report.
<testReportStatus>PASSED</testReportStatus>Sets the overall status (put at the end of a passing test).
<closeReporter/>Flushes the final status to the report.
<var name type>value</var>Declares a test variable ($type $name = value;).
<native>…</native>Escape hatch — injects raw Java verbatim. See below.

Selector (locator) model

An action tag contains exactly one locator child, which becomes a Selenium By. Supported locators, in the recorder's preference order:

LocatorBecomes
<ui:id>value</ui:id> (preferred)By.id(value)
<ui:cssSelector>value</ui:cssSelector>By.cssSelector(value)
<ui:xpath>value</ui:xpath>By.xpath(value)
<ui:linkText>value</ui:linkText>By.linkText(value)
<ui:name>value</ui:name>By.name(value)
<ui:tagName>value</ui:tagName>By.tagName(value)
<ui:click>
    <ui:xpath>//*[@staticId='headerA_5-multiparttextbox_textbox_2']</ui:xpath>
</ui:click>
Don't use <ui:className>

The recorder may fall back to a <ui:className> selector, but the engine does not support it — a case using it will not compile. Replace it with an id, cssSelector or xpath.

Interaction actions

TagAttributesPurpose
<ui:click>Click an element (scrolls into view first).
<ui:clickSimple>Fire a native click event.
<ui:doubleClick>Double-click.
<ui:clickError>Click the error icon inside a Maximo field.
<ui:clickEvent>Fire Maximo's internal sendEvent for the element.
<ui:sendKeys text>textType text into a field. Use with a preceding <ui:clear>.
<ui:clear>Clear a text field.
<ui:mouseOver>Hover over an element.
<ui:executeScript jsCode>jsCodeRun JavaScript on the page.
<ui:executeScriptOnTarget jsCode>jsCodeRun JavaScript with the located element as arguments[0].
<ui:setInnerHTML>Set an element's innerHTML (content child).
<ui:maximizeWindow/>Maximise the browser window.
<ui:screenshot/>Capture a screenshot into the report.

Assertions & verifies

Assert tags fail the test immediately on mismatch. Verify tags are non-blocking — they collect verification errors and let the test continue.

Assert (blocking)Verify (non-blocking)Checks
<ui:assertValue value><ui:verifyValue value>An input field's value.
<ui:assertText text><ui:verifyText text>An element's text.
<ui:assertTitle title><ui:verifyTitle title>The page title (no locator).
<ui:assertElementPresent><ui:verifyElementPresent>The element exists.
<ui:assertElementRequired>A Maximo field is marked required.
<ui:assertElementReadonly>A field is read-only.
<ui:assertElementError>A field shows an error state.
<ui:assertTextPresent text><ui:verifyTextPresent text>Text appears anywhere on the page.

The Maximo-aware asserts (Required, Readonly, Error) are what make MXML valuable for Maximo: they check the field states Maximo exposes rather than raw DOM attributes.

Storing values in variables

Store tags read something into a variable you can reuse later in the case (e.g. capture a generated work-order number, then assert it downstream).

TagPurpose
<ui:getValue var>Store an input's value (recorder calls this storeValue).
<ui:getText var>Store an element's text (storeText).
<ui:getTitle var>Store the page title (storeTitle).
<ui:getAttribute name var>Store a named attribute's value.
<ui:getElementPresent var>Store a boolean — is the element present.
<ui:getVerificationErrors>Emit report lines for all collected verify errors.

The recorder declares the variable first, e.g. <var name="WO_NUM" type="String">""</var>, then the <ui:getValue var="WO_NUM"> tag fills it.

Waits

TagPurpose
<ui:waitForElementPresent>Wait until an element appears (the recorder auto-adds this after menu-toggle clicks).
<ui:waitForText text> / <ui:waitForValue value>Wait until an element's text / an input's value equals a target.
<ui:waitForTitle title> / <ui:waitForTextPresent text>Wait for a page title / text anywhere on the page.
<ui:wait>3</ui:wait>Sleep a fixed number of seconds (use sparingly).
<ui:pause/> / <ui:waitForUserAction>Pause for manual "Continue" / prompt the user (exploratory mode).

Maximo, frames & windows

These tags encapsulate Maximo-specific flows. Many are available for hand-authoring even though the recorder captures the underlying clicks instead.

TagPurpose
<ui:createDriver> + <ui:timeout>Open the browser/driver with an implicit-wait timeout (in beforeTestCase).
<ui:javaScriptExecutor/>Enable JavaScript execution.
<ui:login> (+ <ui:userName>/<ui:password>)Log in; falls back to mx.maximo.username/password params if omitted.
<ui:logout/>Log out.
<ui:openApp name> / <ui:changeApp name>Open / switch to a Maximo application.
<ui:switchToFrame> / <ui:switchToDefaultFrame/>Enter an iframe / return to the top frame. Maximo's main content is in #manage-shell_Iframe; the tag retries via the parent frame on timeout.
<ui:switchToWindow title closeCurrent> / <ui:switchToMainWindow closeCurrent>Switch browser windows/tabs by title.
<ui:sendParam name>Type a named test parameter's value into a field.
<ui:close/>Screenshot on failure, log out, quit the driver (in afterTestCase).

Special values & the native escape hatch

<ui:sendKeys text="$ENTER"><ui:id>searchField</ui:id></ui:sendKeys>

<native>
    System.out.println("Custom step: " + mxService.getParam("mx.maximo.address"));
</native>

Parameters in MXML

Gotchas & tips

Related

Recorder Guide · Writing AI Test Cases · Maximo Testing Playbook · Parameter reference