开发者

Jython/Grinder/Grinderstone: self arg can't be coerced to net.grinder.plugin.http.HTTPUtilities

开发者 https://www.devze.com 2023-01-19 16:07 出处:网络
A grinder script i have been building out for the past few days has been working pretty well up until just now. I am getting a runtime error initially saying:

A grinder script i have been building out for the past few days has been working pretty well up until just now. I am getting a runtime error initially saying:

    self.token___LASTFOCUS = HTTPUtilities.valueFromHiddenInput('__LASTFOCUS')       
TypeError: valueFromHiddenInput(): expected 2-3 args; got 1

so i added [another arg][1], something i knew would be at the beginning of the script, and got a slightly more useful error. Although now I am not sure what to do with this

    self.token___LASTFOCUS = HTTPUtilities.valueFromHiddenInput('__LASTFOCUS', '')       
TypeError: valueFromHiddenInpu开发者_如何学运维t(): self arg can't be coerced to net.grinder.plugin.http.HTTPUtilities

Any idea why 'self' isn't being coerced?

[1]: http://grinder.sourceforge.net/g3/script-javadoc/net/grinder/plugin/http/HTTPUtilities.html#valueFromHiddenInput(java.lang.String, java.lang.String)


found the answer i needed these lines

from net.grinder.plugin.http import HTTPPluginControl
httpUtilities = HTTPPluginControl.getHTTPUtilities()

It looks like HTTPUtilities might be a singleton or has a factory method. Not to sure on what that specific architecture is.

0

精彩评论

暂无评论...
验证码 换一张
取 消