如何参数化Loadrunner Truclient中URL的一部分?

How to parameterize Part of the URL in Loadrunner Trueclient?

如何参数化 URL 的一部分,如下所示

URL : 示例。com/data/api/....../xyz
待参数化:api

我尝试使用 TC.getParam("api") 但返回错误

    Error: Navigate to [Exception] ** failed - an argument is invalid:
 'Location': JavaScript exception 'SyntaxError: Expected ';'' during evaluation

也尝试使用 ArgsContext。TC.getParam("api") 也返回相同的错误:
谁能帮忙解决一下。

我不想参数化整个 URL 因为它太大了。

好吧,我尝试过这样的事情 https://www.smashingmagazine.com/"+LR.getParam("url") 它对我有用。所以你可以尝试类似的方法。

"example.com/data/"+LR.getParam("url")+"/....../xyz"

这里url是一个参数,你必须在LR参数文件中单独定义。让我知道这是否有帮助。请记住,参数选项中的 select Javascript 不是参数。我附上了一个样品给你。Sample Screenshot