0

I have a POST request like that:

POST request

Is there any possibility to get this Response id value by using webdriver. Does Selenium support this yet? I am writing automation test with Java

Thanks

Ragnarsson
  • 1,471
  • 3
  • 34
  • 66
  • Possible duplicate of [How to get HTTP Response Code using Selenium WebDriver with Java?](https://stackoverflow.com/questions/6509628/how-to-get-http-response-code-using-selenium-webdriver-with-java) – fatih_dur May 14 '18 at 01:37

2 Answers2

0

As far as I know, Selenium does not expose any API to read the responses, headers etc. And, if you think about it that makes sense since it's a tool to replicate end user's behavior and an end user will not do so.

Saifur
  • 15,084
  • 6
  • 43
  • 68
0

As Saifur said, this is not supported by Selenium.

The closest you can come to automating this would be to send the post request through a different library and check the response.

aholt
  • 2,455
  • 1
  • 8
  • 13