ContributionsMost RecentMost LikesSolutionsSending HTTP requests and parsing JSON in TestComplete Tasks Sending HTTP requests and parsing JSON in TestComplete. Here are the steps how it can be resolved: Send a GET request tohttps://dog.ceo/api/breeds/image/random. Check the status of the request - if it is successful, the response will return a JSON that contains a link to a random picture of a dog. Parse the returned JSON to extract the link to the image. JavaScript and Python provide support for JSON out of the box; for other languages, you might want to parse JSON as a string or use regular expressions. Send a GET request to the URL obtained from the previous response - this will return an image. 4. Save the response as an image to a JPG file by calling the SaveToFile method like this: response.SaveToFile("C:\\image.jpg") Solution //JavaScript function getThisDog(https) { var aqHttpRequest = aqHttp.CreateGetRequest(https); aqHttpRequest.SetHeader("Accept", "application/vnd.api+json; version=1"); aqHttpRequest.SetHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8"); aqHttpRequest.SetHeader("Accept-Language", "pl"); aqHttpRequest.SetHeader("Accept-Charset", "utf-8, iso-8859-13;q=0.8"); aqHttpRequest.SetHeader("Content-Language", "pl"); var aqHttpRes = aqHttpRequest.Send(); Log.Message(aqHttpRes.Text); return aqHttpRes; } function parseThisDog() { let jsonResponse = getThisDog("https://dog.ceo/api/breeds/image/random"); if(jsonResponse.StatusCode === 200) { let doggyJson = JSON.parse(jsonResponse.Text); let dogImage = getThisDog(doggyJson.message); let randomString = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); dogImage.SaveToFile("C:\\TEST-TRASH\\" + randomString + "dog.jpg"); } else { Log.Error("Something went wrong while trying to connect") } } Screen of img: Re: Adding screenshot from TestComplete to Zephyr Do you use any programming language to write scripts? Re: Adding screenshot from TestComplete to Zephyr Unfortunately not, we are currently configuring Xray with JIRA. Re: Javascript String Interpolation I was just wondering if you have a project in Jscript 🙂 It's great that you managed to fix it. Re: Javascript String Interpolation This works wery well for me: function testInterpolation() { var i = "i_value"; var arr = ["value1", "value2"]; Log.Message(`This string contains that two variables: first one -> ${i} and second one -> ${arr[1]}`); } I'm using the latest version of TestComplete. Re: The parent object was not found: NameMapping.Sys While running the scripts in different machien Hi, use NameMapping condition: https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/conditional-mapping-criteria.html make a: OR, AND condition for differnet values of that object. Re: how to do export report through script It is not possible to export the report from the current script, but... You can always export existing reports from the "Log" folder. Re: how to do descriptive programing in Testcomplete Hi, what do You mean? i don't understand "descriptive", sorry Re: How do I use a variable for the connection string in keyword test db table variables in TestComplete Hi, what exactly do you want to achieve? Do you want to add a variable to TestComplete -> have your login data there and then read it in the database login script? Is it supposed to be encrypted? Re: TestComplete Error I never saw that before, write to support for help.