Hi,
I have some hidden fields and use regex to match:
.regex(""“type=“hidden” name=”([\w=/.\d_%±.$])" id="([\w=/.\d_%±.$])hdnGroupID" value="([\w=/.\d_%±.]*)""").findAll.saveAs(“hdnGroupID”)
Tried this on site http://regex101.com/, it have 2 matches:
MATCH 1
- [27-90]
ctl00$PlaceHolderMain$dtlUsers$ctl05$rptGroups$ctl00$hdnGroupID
- [96-149]
ctl00_PlaceHolderMain_dtlUsers_ctl05_rptGroups_ctl00_
- [168-169]
1
MATCH 2 - [201-264]
ctl00$PlaceHolderMain$dtlUsers$ctl05$rptGroups$ctl01$hdnGroupID
- [270-323]
ctl00_PlaceHolderMain_dtlUsers_ctl05_rptGroups_ctl01_
- [342-343]
2
In Gatling 2.0.0-SNAPSHOT, for each MATCH, I’d like to get 2 values (name and value). For example, get name “ctl00$PlaceHolderMain$dtlUsers$ctl05$rptGroups$ctl00$hdnGroupID
” and value 1
in MATCH 1.
I tried to use
var hdnGroupID = session(“hdnGroupID”).as[Seq[String]]
But it just return “ctl00$PlaceHolderMain$dtlUsers$ctl05$rptGroups$ctl00$hdnGroupID
”
How can I get both name and value (how to declare Seq for this case)?
Thanks in advance.