I want to call the rest api in the selenium and save the JSON (response) in text file.

I also need to pass header value for webservice authentication.

  • 1
    What language are you using? Selenium is not designed for WebServices so you would need to consume the webservice using the language you desire.
    – Paul Muir
    Oct 11 '16 at 17:14

Why you wanted to use Selenium to call web-services? Selenium is not made for it. You can try few things using webdriver actually.

  • Many have already used Java + selenium webdriver to call & interact with webservices. check here for example

Not the answer you're looking for? Browse other questions tagged or ask your own question.