Page 1 of 1

How to check url request response as 200 successfully

Posted: Mon Nov 26, 2018 11:32 am
by csolanki
Hey,

I have read posts regarding api testing and request module ,which we can use in checking response successfully. But I wanted to know, irrespective of the URL, can I just check response is coming as 200 or not ? any UI is under process for the same ?

Re: How to check url request response as 200 successfully

Posted: Tue Nov 27, 2018 4:12 pm
by odklizec
Hi,

If you mean you want to get the response code from Ranorex action like OpenBrowser, then no, there is no such feature. If you want to get the response code from web request, then you need to write some code for this. Check for example this post:
https://stackoverflow.com/questions/133 ... est-and-ht

Re: How to check url request response as 200 successfully

Posted: Wed Nov 28, 2018 10:44 pm
by Vega
Additionally if you want to get the response from an in browser request, you can use something like Chrome dev tools:
form1.png
Just remember if you want to automate and Chrome form objects, you need to launch Chrome with the below flag (just add it to the arguments part of the open browser action):

Code: Select all

--force-renderer-accessibility
But as odklizec mentioned depending on your requirements you may be better off using a coded approach. Just know that coded network requests do not line up with what is in the browser as coded requests make requests outside of the browser...unless you have some type of middleware to pipe the requests from the browser to your API/code/whatever.

Hope this helps

Re: How to check url request response as 200 successfully

Posted: Fri Dec 14, 2018 3:11 pm
by csolanki
Thanks much Gyz. It helped.