Jython/Grinder/Grinderstone:无法将 self arg 强制为 net.grinder.plugin.http.HTTPUtilities
过去几天我一直在构建的磨床脚本到目前为止一直运行良好。我收到一个运行时错误,最初说:
self.token___LASTFOCUS = HTTPUtilities.valueFromHiddenInput('__LASTFOCUS')
TypeError: valueFromHiddenInput(): expected 2-3 args; got 1
所以我添加了 [另一个 arg][1],我知道的东西会在脚本的开头,并得到一个稍微更有用的错误。虽然现在我不知道该怎么办,
self.token___LASTFOCUS = HTTPUtilities.valueFromHiddenInput('__LASTFOCUS', '')
TypeError: valueFromHiddenInput(): self arg can't be coerced to net.grinder.plugin.http.HTTPUtilities
知道为什么“自我”没有被强迫吗?
[1]: http://grinder.sourceforge.net/g3/script-javadoc/net/grinder/plugin/http/HTTPUtilities.html#valueFromHiddenInput(java.lang.String, java.lang.String)
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: valueFromHiddenInput(): 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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到了我需要这些行的答案
看起来 HTTPUtilities 可能是单例或具有工厂方法。
不确定具体的架构是什么。
found the answer i needed these lines
It looks like HTTPUtilities might be a singleton or has a factory method.
Not to sure on what that specific architecture is.