Contributions
Re: ReadyAPI Integration with TestComplete
Thanks,AlexKarasfor the kind update. Here are the sample cURL requests //POST request 1. curl --location --request POST 'URL/oauth/token' \ --header 'Cookie: "XXXXXXXXX"' \ --form 'VAR1="VALUE1"' \ --form 'VAR2="VALUE2"' \ --form 'VAR3="VALUE3"' \ --form 'VAR4="VALUE4"' //subsequent GET request where the output value from POST request will be referred 2. curl --location --request GET'XXXX/create-data' \ --header 'X-OAuth-Authorization: : "token value from the above request"' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Cookie: XXXXXX' //final response where the "VALUE6" needs to grabbed and pass to UI tests Response: { "status": 200, "body": { "VAR5": "VALUE5", "VAR6": "VALUE6", .... } } Notes: 1. Though as mentioned in the document, This type of form-data request can be achieved without ReadyAPI with third-partyrequestspackage especially in python-script but I also saw a note in Python script documentation that dealing with third-party packages are not the recommended approach as it is not stable during execution. 2. Since having cURL requests and seems this is possible without ReadyAPI Integration by referring following threads: Handling with multi-part data Handling REST API in TestComplete1.1KViews1like0CommentsRe: ReadyAPI Integration with TestComplete
AlexKaras Thanks for your reply and as I mentioned, I need to deal with multipart/form-datarequests but I didn't see any appropriate method in the interfacehttps://docs.microsoft.com/en-gb/windows/win32/winhttp/iwinhttprequest-interface?redirectedfrom=MSDNwhich used byaqHttpobject. So only moved on to ReadyAPI.1.1KViews1like2CommentsReadyAPI Integration with TestComplete
As I'm a beginner in TestComplete, I'm interested to know how can we do the following flows where I need to deal with both API and UI tests. Before I begin my UI tests, I need to do the following API calls 1) Call POST Request 2) Get the response from the above POST request and store the particular attribute value in variable "X" 3) Call GET Request with the value stored from the variable "X" 4) Get the response from the above GET request in step#3 and store the particular attribute value in variable "Y" 5) Call GET Request with the value stored from the variable "Y" 6) Initiate the browser with URL, Use the value stored from the variable "Y" Tried: >>I initially start with this<<https://support.smartbear.com/testcomplete/docs/testing-with/advanced/sending-receiving-requests/in-keyword-tests.html#working-with-responses>>but I didn't see any option that how to mention the body-media type: multipart/form-data and get an incorrect response from API calls. >>So moved on with READY API Integration<<https://youtu.be/gBxt1HYtD9U?t=168>> where I did my API calls as intended and now I'm struggling at the final step where I need to get and store the particular attribute value from the response into the READY API Created Global/Custom property and pass it to test complete. Any help is greatly appreciated and let me know the best practices if any.1.1KViews0likes4CommentsHow to to click an element/button where only if it is visible
I'm new to test complete and I need to know how to click an element/button where only if it is visible. I see there are no built-in keywords available for the same. Seems to need to achieve this with the condition strategy. Kindly advise.Solved706Views0likes1Comment