Forum Discussion

vibhashenoy's avatar
vibhashenoy
Occasional Contributor
8 years ago

Insert variables in URL

Hey, I am trying to insert variables in my URL,  since my webpage URL changes every time with the variable. Is there anyway i can navigate to a url which has variables? 

I tried this

https://abcdef.com/abc/@newVar/groups

where newVar is my variable, but it din't work.  Can anyone help me.

3 Replies

  • NisHera's avatar
    NisHera
    Valued Contributor

    First create a string with your fix part of address 

    then convert variable to string 

    concatenate those

    call URL

     

    eg (in Jscript)

             var A= "https://abcdef.com/abc/

              A = A+newVar.toString()  +"/Group"

    Now you have string A with your variable.

     

    if you need A as an object use eval() function....don't think you need it here. 

     

     

  • baxatob's avatar
    baxatob
    Community Hero

    For Python:

     

    url = "https://abcdef.com/abc/@{}/groups".format(newVar)