Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Secure Credential's sent as string in example



Using secure credentials in your example I have the following code:

function loginUser(){
var username = ‘$secure.AUTH_PROD_USER’
var password = ‘$secure.AUTH_PROD_USERPWD’
return $browser.findElement($“logonId”)).sendKeys(username).then(function(){
return $browser.findElement($“password”)).sendKeys(password).then(function(){
return $browser.findElement($driver.By.xpath("/html/body/div[3]/div[2]/div[2]/div[2]/div[1]/form/fieldset/div[4]/button")).click().then(function(){
console.log(“Logging in.”)

When it runs the variables send the sting format of ‘$secure.AUTH_PROD_USER’:

When I remove the ’ ’ from the variable username and password, I get the following error for username and password in sendKeys:

Argument of type ‘$secure’ is not assignable to parameter of type ‘string | Promise’.
(local var) username: $secure

I am a bit of a loss here on why the $secure agument type is not set to string.

Thanks for any help!


Hi, @brsanti: The editor’s syntax checking sometimes gets confused. What happens when you click the Validate button to run the script?


Gah! It works fine… guess the confused syntax checking confused me :upside_down_face: Thanks for the reply Phil!


Yes, it is annoying. If it cannot be relied upon, I wish there were an option to turn it off!