So e.g. when trying to login to a webpage and login fails, the console will return some error message like this
I would like to grab that line and put it in my txt log file.
Is there any method to do that?
You could possibly do something with the Chrome API's?
It provides a bunch of them. https://developer.chrome.com/extensions/api_index
Looks like it should get you into the area of Network messages such as those in your example.
I've used Selenium & Python to extract Performance metrics from browser pages before. But I've never tried using the Chrome API from TestComplete. I suspect it could be done, but having never actually used it, I couldn't say for sure.
Just wondering if we can use TestComplete to automate restful API testing ?
You can integrate with SoapUI.
Or you can write something yourself to do it directly.
Direct approach discussed here: https://community.smartbear.com/t5/TestComplete-Functional-Web/TestComplete-support-for-automating-R...
And another discussion about this, which seemed to end up with SoapUI integration, here: https://community.smartbear.com/t5/TestComplete-General-Discussions/Automate-REST-api-using-TC/td-p/...
Personally, I have a whole bunch of script extensions hooked into the TFS API to allow to update TFS directly from scripts. I used the XMLHTTP object and wrote it myself. As long as you have access to decent docs for the API you want to use, and some way of parsing the response (I used a JSON Parser), it's not terribly difficult.