fenwickrOccasional ContributorJoined 10 years ago13 Posts1 LikeLikes received1 SolutionView All Badges
ContributionsMost RecentMost LikesSolutionsRunning a Batch file fails when logged in but PC User is locked When I run TestRunner via a .bat file when I am logged in and not locked on my PC all tests pass ( as long as the correct info is present) But when it is kicked off via a .bat file when I am logged in but my PC is locked the tests fail and on re run when logged in it works fine Is there anything that I need to set when running via a bat file when my PC is locked or if this is run from a Server could this help?? Re: Changing Port from 25 to 777 Hi I have set the port in the property and not by script I have raised a support call Re: Changing Port from 25 to 777 Hi - I am using API 1.6.0 I have a Test case that has a Groovy Script to update the details of the Subject and Messages and then the email test step It is when I Call this test case with a script that it doesnt pick up the new port But if I run it manualy from the test case it will then pick up the correct port and will then work for the Groovy Script Changing Port from 25 to 777 In the Custom Properties of the Email settings, I have set the Port to 777 after restarting the SOAP UI NG the Port will go back to using 25 As I want to run this via a bat file I need it to use the one I have set (777) not the defualt 25 SolvedRe: updating Body of Email with groovy Script Found an quicker way to update body of txt by using def Email1 = testRunner.testCase.getTestStepByName("SendMail") def message = "Test Message to body " Email1.setPropertyValue("message", "$message") Re: updating Body of Email with groovy Script I am after sample code for Groovy script As all i can find how to do it in VB or Java updating Body of Email with groovy Script I am wanting to run a Groovy Script that updates the body of an email after each test suite is completed before sending the Email I have looked at some of the other quetions around this but I am not to sure where to start Re: Updating Second Child Element Hi Rlong98 It is to setup my requests via a script, as my WSDL set sometime removes the elements when I update them when changes are made to this area, so this way I can make sure they are always the same after an update and use the same values and I will be able to use one request not 80 requests for a smoke test It can also be used for Xquery when you have an element with the same name in a response Found this is a good site to help out http://www.w3schools.com/xsl/xpath_examples.asp Re: Updating Second Child Element Found the answer put in [] after the element and the number of the node/element you are after So parentNode = reqHolder.getDomNode("//Selection") will become parentNode = reqHolder.getDomNode("//Selection[1]") to update the first element/Node and ("//Selection[2]") for the second parentNode = reqHolder.getDomNode("//Selection[1]") parentNode.setAttribute("id", '${#Project#WRunner1}') parentNode.setAttribute("order", "1") reqHolder.updateProperty() parentNode = reqHolder.getDomNode("//Selection[2]") parentNode.setAttribute("id", '${#Project#WRunner2}') parentNode.setAttribute("order", "2") reqHolder.updateProperty() Updating Second Child Element Below is the Code I am using to setup 2 child nodes Selection of Selections- I need to updated the second child node/Element with a New ID and order Number - I have tried to use XmlUtils.getChildElement(parentNode, "Selection") But not sure what to enter in the () or how I can get the second Child Element to update def reqHolder = groovyUtils.getXmlHolder( "$teststepname#Request" ) parentNode = reqHolder.getDomNode("//Selections") XmlUtils.addChildElement(parentNode, "Selection", "") reqHolder.updateProperty() parentNode = reqHolder.getDomNode("//Selections") XmlUtils.addChildElement(parentNode, "Selection", "") reqHolder.updateProperty( //*****Adding attributes***** (In this case, adding an attribute active="true" to the number element parentNode = reqHolder.getDomNode("//Selection") parentNode.setAttribute("id", '${#Project#WRunner}') parentNode.setAttribute("order", "1") reqHolder.updateProperty() Solved