This extension comes handy if you need to call a WebService during the test.
Also you can develop simple web service (python, .Net, ...) to do some 'utility work' - clean up a database, execute sql, etc. and use it in your tests.

attached file contains required js code (tested with selenium 0.8.0). The second version works in 1.0b2 and probably needs improvement (wasn't sure how to declare helper function getWebServiceResponse).

callWebService returns the data from the first node of the result XML.

callWebServiceForValues takes the comma-separated list of names, takes the nodeValues from the first elements with the matching names, and stores the value in variables of the same names (see second example below).

callWebServiceForXML simply returns the result XML if you need to deal with something that has more structure than that.

Examples of implemented commands:

addWebServiceParameter user_name Doe
addWebServiceParameter pass ${password}
addWebServiceParameter timeout ${timeout}
callWebService http://somewebsite/webapp/_qa_/test_automation_svc.asmx/get_email result
.. do something with ${result}    

In the next example, the responseXML from the web method is something like:

callWebServiceForValues http://somewebsite/webapp/_qa_/test_automation_svc.asmx/get_user_object username, password
type username_field ${username}
type password_field ${password}
clickAndWait login_button  
callWebServiceForXML http://somewebsite/webapp/_qa_/test_automation_svc.asmx/get_user_object responseXML
... do something with responseXML which is an XMLDocument    

P.S. thanks to fellow MetaCommunications' developers for providing me with working code for the extension.

Here is a practical example I was able to make work by using a free public web service (

Example Web Service Call


Plain text icon callWebService.js.txt2.53 KB