Forum Discussion

bkbn16's avatar
bkbn16
Contributor
9 years ago

Groovy script must return the current HTTP URL

I am a newbie to this forum as well as Groovy. Therefore I need help on a script.

I am writing a groovy script that would return me the current HTTP URL. What method needs to be called in order to get this done ? 

3 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    I have a feeling that you are using SoapUI / SoapUI NG... Is my guess correct?

    In case you are using TestComplete provide more details about what do you need and what have you tried to do.

    • bkbn16's avatar
      bkbn16
      Contributor

      Yes, I am using SOAP UI. Trying to write a Test script in groovy. But I don't need Test Complete here. The only thing I require is that the script needs to return whatever URL I may give in the address bar.

       

      If I provide http://localhost:8080/ahs/bhs, the script must return the same address in String format.