cancel
Showing results for 
Search instead for 
Did you mean: 

ERROR:groovy.lang.MissingPropertyException: No such property: org for class: Script10.

Highlighted
Visitor

ERROR:groovy.lang.MissingPropertyException: No such property: org for class: Script10.

I am getting an error at this line:

def response = org.apache.http.impl.client.HttpClients.createDefault().execute( get )

 

// Create and send a request
def get = new org.apache.http.client.methods.HttpGet( "https://tst.kaptcha.com/collect/sdk?m=100180" )
def response = org.apache.http.impl.client.HttpClients.createDefault().execute( get )

// Obtain the body of the response
def content = response.entity.content.text

//log.info content

//Get the index for locating the fraud session key
def sessionIdIndex= content.indexOf("ka.sessionId=")
def merchantIdIndex= content.indexOf(";ka.merchantId")

//Store the fraud key
def fraudSessionKey = content.substring(sessionIdIndex+14,merchantIdIndex-1)
log.info fraudSessionKey

//Set value to testSuite level
project = testRunner.testCase.testSuite.project
testSuite = testRunner.testCase.testSuite
testCase = testRunner.testCase

testRunner.testCase.testSuite.setPropertyValue( "fraudToken", fraudSessionKey )

1 REPLY 1
Highlighted
Community Hero

Re: ERROR:groovy.lang.MissingPropertyException: No such property: org for class: Script10.

What are you trying to do?

What happens if you do import the class, HttpClients?
What version of the are you using?


Regards,
Rao.
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors