Contributions
Re: Unable to print list of all nodes including child nodes of a Json response using groovy script
Hi Rao, As per my requirement I need to capture all node values individually & store into an Excel without passing the node names. Apart from this I also need to compare few nodes like branch number, status and branch email etc to compared with expected.2.6KViews0likes1CommentRe: Unable to print list of all nodes including child nodes of a Json response using groovy script
I wanted to capture all the actual node and compare it with expected response nodes. I cannot compare the whole response as most of the node values would change every time, so I would want to check if all the expected nodes are available or not. To achieve this I thought of comparing with list of actual nodes names and expected.2.6KViews0likes3CommentsUnable to print list of all nodes including child nodes of a Json response using groovy script
Unable to print all node values and also child node values of a JSON response using groovy script in a Soap UI basic version Below is my response { "lookupResponse": {"branches": { "longitudeForMap": "-87.541405", "latitudeForMap": "37.976581", "foundWithinRadius": true, "branch": [ { "branchNumber": "123", "location": "Balt-NE, IN", "addressLine1": "test RD", "addressLine2": "", "city": "Baltimore", "state": "IN", "zip": "47715", "branchManager": "tester, DAN", "branchEmail": "test0435@gmail.com", "phoneNumber": "(123) 479 - 6895", "mloId": "98521", "longitude": "-87.492300", "latitude": "37.993700", "distance": "2.920000", "speaksSpanish": false, "faxNumber": "(123) 473 - 5349", }] }}, "referenceNumber": "12345678", "status": "SUCCESS" } Below is my Groovy code: import groovy.json.* def response = context.expand( '${'+strRequestName+'#Response}' ) def jsonResponse_Act = new JsonSlurper().parseText(response) log.info "node lesngth is "+ jsonResponse_Act.size() for(int nodeid=0 ; nodeid<int_nodelength;nodeid++) { //Getting error at this statement log.info jsonResponse_Act[nodeid] } Tried this also def nodes=jsonResponse_Act.lookupResponse log.info "size "+ nodes.size() log.info "value "+ nodes[0]2.6KViews0likes6CommentsRe: remote procedure call failed while saving an excel file through vbscript in testcomplete
Dim objExcel, objWorkbook, objDriverSheet, columncount, rowcount,strReleaseDate,strReleasePswd set objExcel = Createobject("Excel.Application") Set objWorkbook = objExcel.WorkBooks.Open(exppath) Set objDriverSheet = objWorkbook.Worksheets("TestCase") for row_idx = 1 to rowcount Stepnum = objdriversheet.cells(row_idx,1) Stepdesc = objdriversheet.cells(row_idx,2) ..... objWorkbook.Save--[Getting error at this point] Next2.5KViews0likes2Comments