cancel
Showing results for 
Search instead for 
Did you mean: 

compare property names with data in excel file

SOLVED
Highlighted
Super Contributor

Re: compare property names with data in excel file

So, what is the error you are getting here?

Highlighted
Contributor

Re: compare property names with data in excel file

This is the error:


groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.support.XmlBeansPropertiesTestPropertyHolder$PropertiesStepProperty.setPropertyValue() is applicable for argument types: (java.lang.String, java.lang.String) values: [InteressentNr1, 6913050] error at line: 20

Highlighted
Super Contributor

Re: compare property names with data in excel file

Ok, you are getting error at line 20. Actually setPropertyValue("", Val) always accepts String. Try to store prop.getName to a String value and then pass there. Like this - 

 

def testStep = testRunner.testCase.testSteps["Properties"]
if (testStep.getPropertyCount() > 0){
for (prop in testStep.getPropertyList()){
for(int i=0;i<size;i++){
Cell f=sheet1.getCell(0,i)
field=f.getContents()
Cell f1=sheet1.getCell(1,i)
value=f1.getContents()
String propName = prop.getName()
log.info propName
if(prop.getName()==field){
testRunner.testCase.testSteps["Properties"].setPropertyValue(propName, value)
}
else{
log.info "Not Found"
}
}
}
}

View solution in original post

Highlighted
Contributor

Re: compare property names with data in excel file

Its giving same error. 

Highlighted
Super Contributor

Re: compare property names with data in excel file

Please recheck again. I have changed the line 20

Highlighted
Contributor

Re: compare property names with data in excel file

It worked. Thank you so much

Highlighted
Super Contributor

Re: compare property names with data in excel file

Thats good. Smiley Happy And remember the rule for this community. 

 

  1. Always accept the solution which helped you.
  2. Don't forget to give kudos for the working solutions provided by community members.
  3. Before asking any question in here, Please check whether the question was asked earlier here. AND
  4. Prepare yourself and learn the tools and someday please help someone from the team. You will feel great. 

Good Luck !

New Here?
Join us and watch the welcome video:
Read the Latest News
JuneSCNJ
Top Kudoed Authors