- web apps
Why Install Chrome Extension?
Steps to Test Locally Hosted Apps
How to Turnoff Onboading Tutorial?
Non-Text Keys in Test Cases
Basic Authentication for Web
Why Bypass CAPTCHA?
Test Case Failures Due to Link Text Capture Issues
Why Is a Single Video for All Test Cases in a Test Plan Unavailable in Some Cases?
How to Handle Browser-Related Permission Issues?
Why Can’t Selenium ChromeDriver Interact With 3DS Authentication Pages?
How Do I Fix the Try Again Error When Opening the Testsigma Desktop App?
Why Am I Getting an Error While Registering the Agent?
Why Does the Try Again Error Appear While Installing the Testsigma Agent in a Proxy Environment?- mobile apps
Apple Pay Automation with Testsigma
How do I Enhance the Execution Speed for Mobile Native Apps?
Why am I Facing Permission Error During Local Test Execution?
How to Resolve App Launch Issues?
Why does the iOS App Close Right After Opening in Testsigma?
How to Execute Android/iOS Tests in Emulators/Simulators?- general
Why am I Unable to Download the XLS File from the Edge Browser?
How to Handle Browser-Related Pop-Up Issues?
How to Handle Text-Based CAPTCHA in Testsigma?
Why does Test Execution Fail with the Error No Route to Host?
Why do Errors Occur When I Try to Download Files from The Exports Page?
How to Test Flutter Apps Using Accessibility Mode?
How to Add Multiple Runtime Variables in Data Generator Functions?
How to Insert Test Data in RAW Body for POST API?
What is Chrome for Testing and How Does it Work?
How Can I Set Up Authenticator-Based Authentication in Testsigma?
How to Update an Excel File in Testsigma Uploads?
What Causes Longer Automation Test Execution Times in a Test Plan?
How Do I Retrieve the OTP When it’s Embedded within HTML Tags?
How to Configure the OracleDB Add-on in Testsigma?
How Do I Retrieve the OTP When it’s Embedded within HTML Tags?
When an OTP is embedded within HTML tags in an email, extracting it using a regex pattern also captures the surrounding HTML symbols. To use the OTP in test execution, an addon is used to remove these extra characters and extract only the numeric value.
This article discusses how to remove the HTML tag symbols from the OTP.
Prerequisites
Before you begin, ensure that you have referred to the documentation on MailboxFunctions Function Type.
Steps to Install the Addon
- From the left navigation bar, go to Addons and click Add-ons.

- Under the New & Updated Addons section, search for the Remove Special character from testdata addon and click Install.

Steps to Remove the HTML tag symbols from the OTP
-
In your test case, first, use the Store test data1 in test data2 NLP to store the extracted OTP in a runtime variable.

- Click the test data1 placeholder and replace it by selecting Data Generator from the Test Data Types dropdown.

- In the Data Generator overlay, configure the Get Email OTP function by selecting Default as the type, MailBoxFunctions as the function type, entering the regex pattern (for example, >\d{6}<), choosing the mailbox, setting the timeout, and clicking Save.

- Enter a variable name in the test data2 placeholder.

- Click Create Step.

- Click the test data1 placeholder and replace it by selecting Data Generator from the Test Data Types dropdown.
-
Secondly, use the Remove Special char testdata1 from testdata2 and store it in runtime variable NLP to remove the special character from the OTP.
- Click the testdata1 placeholder and enter ><.

- Click the testdata2 placeholder and replace it by selecting Runtime from the Test Data Types dropdown.

- In the Runtime Variable overlay, select the runtime variable you created in the previous step.
- Enter a variable name in the variable placeholder.
- Click Create Step.

- Click the testdata1 placeholder and enter ><.