I am using TestComplete 7. In this for configuration I have to post XML on web at specified IP and port address. I am using C++ Scripting language. How can I do this? or if there is other way to do same using interface and without scripting??
Asked
Active
Viewed 478 times
1
-
@Tony: It's a proprietary language used in the automated testing tool TestComplete. Basically, it's JScript/JavaScript with square bracket notation. – Helen Apr 19 '11 at 12:27
-
@Tony: yes. As TestComplete gives you facility that you can write your routines in the form of C++ script. After that you can use those Script in your test cases. – Ali Ahmed Apr 19 '11 at 12:30
-
@Ali: Can you elaborate on what you mean by "post XML on web"? Upload an XML file to a web site? Pass an XML file to a web service? Something else? – Helen Apr 19 '11 at 12:31
-
@Helen: I want to post XML like the following; "
IP CAM 3 -
How do you manually upload the files to these cameras? Via FTP? – Helen Apr 19 '11 at 14:24
1 Answers
1
Looks like you need something like this:
XmlHttpRequest = new ActiveXObject("MSXML2.XMLHTTP.3.0");
XmlHttpRequest.open("POST", "http://camera.ip/configuration_page", false);
XmlHttpRequest.send("<?xml version="1.0" ?> <Config> <Video_Input_Source>IP CAM 3</Video_Input_Source> </Config>");
This is JScript. This code will work in a C++Script TC project. But there may be problems with the "new ActiveXObject" statement in a C++ application if you put the code there. So, you will need to modify the code to use a different way to create the same "MSXML2.XMLHTTP.3.0" object in your C++ app. The idea remains the same.

Alex
- 587
- 3
- 9