You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 2, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: synthetics/test-config/auth.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -220,15 +220,15 @@ Some services may not be accessible during Synthetics tests due to violations of
220
220
221
221
#. Add a step of type :guilabel:`Go to url`, and in :guilabel:`URL`, enter the URL of the target's authentication page.
222
222
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``.
224
224
225
225
.. note::
226
226
In the script, set the variable url to the URL of your own virtual phone number's SMS service.
227
227
228
228
.. code-block:: javascript
229
229
230
230
functiongetOtp() {
231
-
consturl="https://api.alfa.smartlook.cloud/sms";
231
+
consturl="https://your-page.example.com/sms";
232
232
var request =newXMLHttpRequest();
233
233
request.open("GET", url, false);
234
234
request.send();
@@ -307,7 +307,7 @@ Your email service must be accessible through an API. Some services may not be a
307
307
308
308
#. Add a step of type :guilabel:`Go to url`, and in :guilabel:`URL`, enter the URL of the target's authentication page.
309
309
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``.
311
311
312
312
.. note::
313
313
In the script, set the variable url to the URL of your own email inbox API endpoint.
0 commit comments