Skip to main content

How to use external parameters in the test script

From time to time we see a need to use parameters that should be received from an external source and/or to be shared with other systems. The following code sample demonstrates how we read a URL from external DB and use it in the test script.

For this sample, we use Firebase DB with an entry called ‘url’.
client.rtcActivateWebhook("https://[Firebase-account].firebaseio.com/url.json", function(url) {
    // Remove quotes from the url string 
    url = url.substr(1,url.length -2);

    client.rtcInfo('Received URL using rtcActivateWebhook. url = ' + url);

    // Go to the received URL
    client.url(url);
})

Was this article helpful?

0 out of 0 found this helpful