3. 3
Ihr Partner für den digitalen Wandel.
Individuelle IT-Lösungen aus einer Hand.
Facts and Numbers.
Founded 1994
Headquarters: Ratingen
Branches:
Frankfurt a.M., Köln,
München, Hamburg
> 360 Employees
ca. 48 Mio. €
Revenue in 2022
Training company
> 125 Customers
across industries
Vendor neutral
certified partner
of leading technology
comanies
4. 4
About me
• Employee at MT GmbH in Ratingen since January
2014
• Department Manager APEX & JavaScript @ MT GmbH
• Project Leader and Developer (JavaScript & APEX)
• DOAG-Initiator – JavaScript
• Systems Integrations Specialist
UNIX-Server and Networkadministration
• Host on Devs on Tape Podcast
Kai Donato
@_KaiDonato
5. 5
• 1
• 2
1. About Me
Why perform (automated) UI tests?
2.
What's out there?
3.
Testing APEX Applications
4.
Reporting
5.
Flakiness in automated UI testing
6.
Agenda
7. 7
Why perform (automated) UI tests?
Required Information is provided
All Workflows work correctly
Save time
Error-Message validation
Ensure User Authorization works correctly
11. 11
Testing APEX Apps - Requirements
Offer extensive reporting options
Session management
Handle Flakiness
Handle different page contexts
Make interactions with page elements easy
12. 12
Testing APEX Applications
Locating Page Elements – How can we find this button?
<button id="submit_bttn" data-test-id="submit" class="t-Button--hot">Submit</button>
Element Type Element Id Id only for testing CSS class Element text
(what the user sees)
Using…
• CSS selector syntax
• #submit_bttn
• button[data-test-
id=submit]
• .t-Button--hot
• Xpath selector syntax
• //button[@id=‘submit_bttn’]
• //button[@data-test-id=‘submit’]
• //button[@class=‘t-Button--hot’]
• //button[text()=‘Submit’]
13. 13
Testing APEX Applications
<button id="submit_bttn" data-test-id="submit" class="t-Button--hot">Submit</button>
Element Type Element Id Id only for testing CSS class Element text
(what the user sees)
Locating Page Elements – Cypress
cy.get('#submit_bttn'); // CSS selector support
cy.xpath("//button[text()='Submit']"); // XPath selector support (*)
cy.get('.t-Button--hot').contains('Submit'); // Use CSS selectors, still query by text
14. 14
Testing APEX Applications
<button id="submit_bttn" data-test-id="submit" class="t-Button--hot">Submit</button>
Element Type Element Id Id only for testing CSS class Element text
(what the user sees)
Locating Page Elements – Playwright
await page.locator("#submit_bttn"); // CSS selector support
await page.locator("//button//span[text()='Submit']"); // Xpath selector support
await page.locator('button:has-text("Submit")'); // CSS selector + query by text
await page.locator('text="Submit"'); // Get element only by text
19. 19
Testing APEX Applications
Session Management - Navigating within the current session
Standard URLs
Friendly URLs
https://hostname:port/ords/f?p=<app_id>:<page_number>:<session_id>
https://hostname:port/ords/path_prefix/r/app_alias/page_alias?session=13766599855150
28. 28
Solutions to Flakiness - Playwright
Auto-waiting and actionability checks
Before an element is being interacted with, Playwright makes sure that it
is ready for the interaction.
await page.locator("//button//span[text()='Sign In']").click();
• Retries until element is found or timeout is reached
• Performs actionabilty checks before “click”-action is executed
29. 29
Solutions to Flakiness - Playwright
Actionability checks
• Element is attached to the DOM/ a Shadow Root
• Element is visible
• Element is stable
#sign_in_bttn {
visibility: hidden;
display: none;
}
30. 30
Solutions to Flakiness - Playwright
Actionability checks
• Element is enabled and editable
<button type="button" class="a-Button" disabled data-action="reset-report">Reset</button>
• Element receives events
Overlay
33. 33
LCT
Interacting with page elements
Simply select the element you want to interact
with
No need to worry about selectors
Select Interactive Grid columns as well
For custom page elements, manually entering
Xpath or CSS selector is also supported