Splunk Observability Cloud

Synthetic Browser Tests: Usage of variables

lnkir
New Member

I am trying to set up a synthetic browser test that makes use of variables. I can't seem to find information about the usage of variables in Browser Tests other than this. So far I tried to:

  • Access Global variable as a url in a "go to URL" step -> which leads to a "https:// is not a valid URL" although I can see the variable in the "variables" tab
  • Access Global/Predefined variables in "execute Javascript" steps -> undefined
  • Set variable via "Save return value from javascript" to variable var and try to reuse it in both
    -> "assert Text present" with {{custom.$var}} -> undefined

           -> "execute Javascript" with custom.var -> undefined

  • Assign var/const in "execute Javascript" step and reference it in consecutive "execute Javascript" steps -> undefined
  • Tried to access built-in variables: in "execute Javascript" tests (except those that are only available in API-Tests) -> undefined

 

  • Which raises the following questions for me:

    What is the idiomatic way to use variables in Synthetic Browser Tests? So far it seems to me that they can only be used to fill a field as its the only Action mentioned here and no other action I tried seems to support variables which would quite honestly be really dissapointing.
  • Am I overlooking any documentation?
  • Which kind of actions support the use of variables created by other steps?

 

Thank you

Labels (1)
0 Karma

lnkir
New Member

Thank you for the fast reply! This is rather unfortunate. Are there any aspirations to allow the use of variables in other actions in the future?

0 Karma

PaulPanther
Motivator

Unfortunately for browser tests you can only use the global variables to fill any fields on a web page with the "Fill in Field" action . 

Feel free to create an idea as a feature enhancement request at https://ideas.splunk.com/

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...