Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit 2a06eb3

Browse files
authored
Merge pull request #2704 from splunk/adasplunk-DOCGUILD-28907
[DOCGUILD-28907] Bugfix
2 parents 6ecf47c + 5e0abd0 commit 2a06eb3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
-36 KB
Loading

synthetics/test-config/auth.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,15 +220,15 @@ Some services may not be accessible during Synthetics tests due to violations of
220220

221221
#. Add a step of type :guilabel:`Go to url`, and in :guilabel:`URL`, enter the URL of the target's authentication page.
222222

223-
#. Add a step of type :guilabel:`Save return value from JavaScript`, and in the code field, paste the following JavaScript. This script retrieves data from a specified URL using ``XMLHttpRequest`` and extracts the OTP from that data. You configure your test to save this OTP in a global variable named ``otp``.
223+
#. Add a step of type :guilabel:`Save return value from JavaScript`, and in the :guilabel:`code` field, paste the following JavaScript. This script retrieves data from a specified URL using ``XMLHttpRequest`` and extracts the OTP from that data. You configure your test to save this OTP in a global variable named ``otp``.
224224

225225
.. note::
226226
In the script, set the variable url to the URL of your own virtual phone number's SMS service.
227227

228228
.. code-block:: javascript
229229
230230
function getOtp() {
231-
const url = "https://api.alfa.smartlook.cloud/sms";
231+
const url = "https://your-page.example.com/sms";
232232
var request = new XMLHttpRequest();
233233
request.open("GET", url, false);
234234
request.send();
@@ -307,7 +307,7 @@ Your email service must be accessible through an API. Some services may not be a
307307

308308
#. Add a step of type :guilabel:`Go to url`, and in :guilabel:`URL`, enter the URL of the target's authentication page.
309309

310-
#. Add a step of type :guilabel:`Save return value from JavaScript`, and in the code field, paste the following JavaScript. This script retrieves data from a specified URL using ``XMLHttpRequest`` and extracts the OTP from that data. You configure your test to save this OTP in a custom variable named ``otp``.
310+
#. Add a step of type :guilabel:`Save return value from JavaScript`, and in the :guilabel:`code` field, paste the following JavaScript. This script retrieves data from a specified URL using ``XMLHttpRequest`` and extracts the OTP from that data. You configure your test to save this OTP in a custom variable named ``otp``.
311311

312312
.. note::
313313
In the script, set the variable url to the URL of your own email inbox API endpoint.

0 commit comments

Comments
 (0)