# Observing issues with formParam when using new version of Gatling

**URL:** https://community.gatling.io/t/observing-issues-with-formparam-when-using-new-version-of-gatling/9417
**Category:** Gatling (Open-Source)
**Created:** [November 22, 2024, 4:09pm UTC](https://community.gatling.io/t/observing-issues-with-formparam-when-using-new-version-of-gatling/9417 "2024-11-22T16:09:25Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![kkunala1976](https://avatars.discourse-cdn.com/v4/letter/k/bbce88/32.png) [@kkunala1976](https://community.gatling.io/u/kkunala1976)
#### Post date: [November 22, 2024, 4:09pm UTC](https://community.gatling.io/t/observing-issues-with-formparam-when-using-new-version-of-gatling/9417/1 "2024-11-22T16:09:25Z")

</div>

Hello,

I am migrating my scripts from Gatling 3.3.1 to 3.11.2.  
For formParam method; when I pass the value; its giving an error and suggests to convert the value as String Expression. However, in the older version it takes the value as in the HAR file (Observed in request response in Chrome Dev tools).

Any suggestions here on how to resolve this issue?

Thanks,  
Nutan

---

<div class="post-metadata">

### Author: ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)
#### Post date: [November 22, 2024, 4:45pm UTC](https://community.gatling.io/t/observing-issues-with-formparam-when-using-new-version-of-gatling/9417/2 "2024-11-22T16:45:15Z")

</div>

Sorry, but it’s unclear what your issue is.

Do you have an issue when generating from an HAR file? If so can you please provide your HAR file?

If not, please provide a procedure to reproduce your issue.

Note: the gap between the version you’re upgrading from and to is huge, make sure to check each upgrade guides: [Gatling upgrade guides](https://docs.gatling.io/release-notes/upgrading)

---

<div class="post-metadata">

### Author: ![trinp](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/trinp/32/1593_2.png) [@trinp](https://community.gatling.io/u/trinp)
#### Post date: [November 23, 2024, 3:03am UTC](https://community.gatling.io/t/observing-issues-with-formparam-when-using-new-version-of-gatling/9417/3 "2024-11-23T03:03:43Z")

</div>

could you share your script and show exactly your formParam of HAR file ?

---

<div class="post-metadata">

### Author: ![kkunala1976](https://avatars.discourse-cdn.com/v4/letter/k/bbce88/32.png) [@kkunala1976](https://community.gatling.io/u/kkunala1976)
#### Post date: [November 26, 2024, 8:25pm UTC](https://community.gatling.io/t/observing-issues-with-formparam-when-using-new-version-of-gatling/9417/4 "2024-11-26T20:25:16Z")

</div>

Its not an issue generating HAR file. I have imported the HAR file using the gatling recorder tool.  
In places when formParam function is used; it always says to send the formParam value as an expression. Please, see attached screenshot.  
In the previous versions; it was working. I am trying to avoid to convert to expression as this is happening across all the regression suite (The regression suite is too big)

 ![20241126_122203](https://europe1.discourse-cdn.com/flex013/uploads/gatling2/original/2X/6/6b94ea714153cc28973f9594c74914ec241846ae.jpeg)

Thanks

---

<div class="post-metadata">

### Author: ![kkunala1976](https://avatars.discourse-cdn.com/v4/letter/k/bbce88/32.png) [@kkunala1976](https://community.gatling.io/u/kkunala1976)
#### Post date: [November 26, 2024, 8:27pm UTC](https://community.gatling.io/t/observing-issues-with-formparam-when-using-new-version-of-gatling/9417/5 "2024-11-26T20:27:24Z")

</div>

Hello,

I cannot share the script. However, the formParam is  
.formParam(“ctl100\_ctl100\_headerBody.ScriptManager…”,“\<value as in the screenshot error”)

Thanks

---

<div class="post-metadata">

### Author: ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)
#### Post date: [November 26, 2024, 8:38pm UTC](https://community.gatling.io/t/observing-issues-with-formparam-when-using-new-version-of-gatling/9417/6 "2024-11-26T20:38:40Z")

</div>

It should work so I’m pretty sure you’ve broken the imports.

Please make sure to only have:

```auto
import scala.concurrent.duration._

import io.gatling.core.Predef._
import io.gatling.http.Predef._

```

---

<div class="post-metadata">

### Author: ![kkunala1976](https://avatars.discourse-cdn.com/v4/letter/k/bbce88/32.png) [@kkunala1976](https://community.gatling.io/u/kkunala1976)
#### Post date: [November 26, 2024, 10:43pm UTC](https://community.gatling.io/t/observing-issues-with-formparam-when-using-new-version-of-gatling/9417/7 "2024-11-26T22:43:05Z")

</div>

I have these imports in the scripts.  
Does new version of gatling does not consider special characters (like ; , 🙂 in formParam?

---

<div class="post-metadata">

### Author: ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)
#### Post date: [November 26, 2024, 10:48pm UTC](https://community.gatling.io/t/observing-issues-with-formparam-when-using-new-version-of-gatling/9417/8 "2024-11-26T22:48:02Z")

</div>

> Does new version of gatling does not consider special characters (like ; , 🙂 in formParam?

No, unrelated.

> I have these imports in the scripts.

Are you sure you don’t also have other imports too. Duplicate imports can break Scala code.

If not, there’s no way to help you unless you provide a code sample that shows your issue, even with sensible data removed.

---

<div class="post-metadata">

### Author: ![trinp](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/trinp/32/1593_2.png) [@trinp](https://community.gatling.io/u/trinp)
#### Post date: [November 27, 2024, 12:46am UTC](https://community.gatling.io/t/observing-issues-with-formparam-when-using-new-version-of-gatling/9417/9 "2024-11-27T00:46:39Z")

</div>

For security concern, please at least change your script data, else it is very ambiguous for us to understand what exactly you have done there.  
Possible that you are trying to convert data type which leads to the error.

---

<div class="post-metadata">

### Author: ![system](https://europe1.discourse-cdn.com/flex013/uploads/gatling2/original/2X/b/b148e0742de35c6280726cabf3ecd3de2d320f63.png) [@system](https://community.gatling.io/u/system)
#### Post date: [December 27, 2024, 12:47am UTC](https://community.gatling.io/t/observing-issues-with-formparam-when-using-new-version-of-gatling/9417/10 "2024-12-27T00:47:27Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
