Contributions
Creating a SOAP request for webservices testing through script
Hi, I want to create a soap request as shown below. As you can see from the code below, the method Request1RQ takes an object as in input parameter and then provides the response back. I am creating a SOAP request through TC as shown in the link (http://support.smartbear.com/viewarticle/18902/). However , i am not able to pass the values(CFU) into the parameter HotelCityCode. The parameter can be accessed by the following line TypeFactory.HotelSearchCriterionType.HotelRef.HotelCityCode = "CFU" My question is, how can i Specify the values for the HotelCityCode method through TestComplete code? Can someone please help me with this? I feel that it has a very simple solution , but for some reason i am not able to get this working inspite of trying this for the past two days:( <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <authentication xmlns="http://xmlota.wspan.com/webservice/"> <userid>userone</userid> <password>nicole1</password> </authentication> </soap:Header> <soap:Body> <Request1RQ xmlns="http://XXXXXXXX/2003/05" Version="1"> <AvailRequestSegments> <AvailRequestSegment> <StayDateRange Start="2012-08-14" End="2012-08-21"/> <RoomStayCandidates> <RoomStayCandidate> <GuestCounts> <GuestCount Count="2" AgeQualifyingCode="10"/> </GuestCounts> </RoomStayCandidate> </RoomStayCandidates> <HotelSearchCriteria> <Criterion> <HotelRef HotelCityCode="CFU"/> </Criterion> </HotelSearchCriteria> </AvailRequestSegment> </AvailRequestSegments> </OTA_HotelAvailRQ> </soap:Body> </soap:Envelope>17KViews0likes2CommentsRe: Question about Referencing
Hi Robert, I must have been really tired to overlook this one:( I got exactly what i was looking for at http://smartbear.com/support/viewarticle/11452/ Thanks, Shiv Posting the answer so that it can help others(in case others ask such a silly question like me:( )689Views0likes0CommentsRe: Question about Referencing
Hi Robert, sorry for the delay in getting back , but i was on leave for the past two days. Actually,i have a file which consists of code. For ecample, it contains the function "EnterText". In file 1 i have 10 lines corresponding to the ten different steps in the test case. One of thelines lookslike below call EnterText("Var1","var2","var3") so, when the user runs File1 in TC as a script function,the functions(which are in file 2) will be called in the proper sequence. the reason, i want to follow this structure is , i dont want the user to see the complicated functions in file 2(like "EnterText" and other similar functions). the user will jusrt see the steps like shown above(call EnterText("Var1","var2","var3")) and this will make life easier for the end user is there any way of achieving this? hoppefully, the question is clear to you Thanks, Shiv689Views0likes0CommentsQuestion about Referencing
Hi, I am planning to create an Automation Framework with excel where the user will enter the data for creating the test cases. Then i will have a script developed in TestComplete, which will read these steps and create an Automated script(in VB). I will be creating two files, one file(File 1) which will contain the steps of the test case and another file(File 2) which will contain all the common functions. a) Now I want the user to see only File 1 and File 2 should be referenced from file 1. Is there a functionality in TC by which I can create a reference library and Keep File 2 there? My whole purpose is the user will find it easy to decode code of File 1 and the complex code of File 2 should be kept away from the user. Is there a way to achieve this? b) Also,as part of my execution i read a lot of values from the screen and use them later on during the execution. What would you recommend for storing these values at runtime? Should I store these values as project variables or should I store them in excel and retrieving it(as and when required)? I tried finding the answer to these questions on the forum , but i was not able to find the answer and hence this post Thanks, Shiv14KViews0likes3CommentsRe: Help in creating a function to form an obejct
I dont think that is a problem Robert as I ran the line below with all the objects in a single statement and it ran fine Aliases.ie.HomePage.SearchPanel.FindAHotel.SetText("London") Any other way to achieve this, that you can suggest?1.2KViews0likes0CommentsRe: Help in creating a function to form an obejct
Hi Robert, I had tried the same and without luck Infact , just to be on the safer side, i copied your reply and tried it on and there was the same error thrown "Object doesn't support this property or method" when the cursor came to Eval function Can there be some reference which is missing from the project? Thansk, Shiv1.2KViews0likes0CommentsHelp in creating a function to form an obejct
Hi, I want to perform the below statement Aliases.ie.HomePage.SearchPanel.FindAHotel.SetText("London") To execute this statement from a framework I will create a function EnterText which takes the following inputs a. Window Name(for the example above the value will be "Aliases.ie.HomePage.SearchPanel") b. Control name(for the example above the value will be"FindAHotel") c. Parameter(for the example above the value will be "London") The code snippet of the EnterText function is below ********************************************************************************* Sub EnterText (strWindowName, strControlName, strValue) Set objWin = Aliases.ie.HomePage.SearchPanel Eval(objWin & "." & strControlName).SetText(strValue) If Err.Number <> 0 Then BuiltIn.ShowMessage("Data entered correctly") Else BuiltIn.ShowMessage("Error in forming the Control. Please try again") End If End sub ************************************************************************************* I am setting the object ObjWin in the function itself to the alias, But I am getting the error "Object doesn’t support this property or method" when the cursor goes to Eval function Also, can I pass the Parameter " Aliases.ie.HomePage.SearchPanel" as strWindowName, rather than referencing it within the function. For e.g., Can i call the EnterText function like this? Call EnterText("Aliases.ie.HomePage.SearchPanel","FindAHotel","Test") Can you please help me achieve my objective here(being able to pass the required parameters to EnterText function to make it as a modular function. An example will help to understand it better Let me know if you need more details on what exactly I am trying to achieve here Thanks, Shiv15KViews0likes6Comments