Contributions
IXMLDOMDocument in Python to call SOAP from testcomplete?
Hello. I'm usint TestComplete 11 at work. So. Let's say I have a web service in TestComplete, called PetService. Here's my code. I wrote it after reading TC docs related to SOAP testing. def run(): WebServiceInfo = WebServices.CreateWebServiceInfoFromItem("PetService") requestObj = WebServiceInfo.PrepareRequestObject("GetClientPets") requestObj['clientCode'] = 2947 WebServiceInfo.PrepareRequest("GetClientPets", requestObj) Now I need to send the request, get the response and parse it. I tried to createXmlHttpRequest, but all my attempts failed. By the way, TestComplete documentation is still missing some useful python examples.1.5KViews0likes4CommentsRe: How do I iterate over links in TC Python script?
Tanya, Thank you very much for your reply. The code you provided works like a charm :catvery-happy: As for me, TestComplete documentation is missing some essential python examples. There are a lot of articles related to TestComplete, which only have code samples in other scripting languages. I know python far better then any other language, however some python + TestComplete usage specifics may still be unclear.1.5KViews0likes1CommentHow do I iterate over links in TC Python script?
def GetPageLinks(page): linkList = [] i = 0 while i < page.contentDocument.links.length: if Browsers.CurrentBrowser.Family == Browsers.btIExplorer: linkList.append(str(page.contentDocument.links.item[i])) #IE if Browsers.CurrentBrowser.Family == Browsers.btChrome: linkList.append(str(page.contentDocument.links.item[i].href)) #chrome i = i + 1 linkList = list(set(linkList)) return linkList Hello. How do I ask for link from FF? None of what I tried works. The code above seems to work fine for Chrome & IE.Solved1.5KViews0likes4Comments