question

xmac avatar image
xmac asked JeffJ answered

How to substitute in xpath using form maps ?

Im trying to substitue a variable in xpath using formmaps, I have a xpath like TBODY/TD[$r]/TR[5]/INPUT . I want to use a while loop and increment the value of r and use the xpath as target for getting text. Now How do I use form maps to achive this ? I tried like the screenshot I have shown , but having no luck ![form map][1] ![code][2] [1]: /storage/temp/4295-formmaps.png [2]: /storage/temp/4296-codeline.png
iTestxpathVariablesform maps
formmaps.png (6.3 KiB)
codeline.png (2.5 KiB)
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
JeffJ avatar image
JeffJ answered
Change $r to '{0}'. Form Map targets work almost identically to Response Maps queries. You'll use '{0}', '{1}', etc. for specifying arguments for the targets. The argument name can be anything as it's used more for describing the argument to the user.
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.