Here is our table
![](/Support/Attachment/104808.aspx)
To reach the table navigate to
http://libraryinformationsystem.org/react-js
then login with librarian/librarian credentials and click Books link at the top of the page.
Let's build a locator of Edit button for a given book. Recording a click on any of Edit buttons will produce a locator like
//tr[5]/td[7]/div/button[1]
Properties of the captured object will look like
![](/Support/Attachment/104809.aspx)
To parameterize the XPath expression for the object enter the following value into XPATH property:
param_vars://tr[./td/text()='{BookName}']/td[7]/div/button[1]
Here param_vars: prefix tells Rapise that the locator is parameterized. {BookName} is a placeholder for the parameter value. You may also use % instead of curly braces: %BookName%.
To define the parameter select the object in the Object tree, right click it and choose Add Parameter from the popup menu.
![](/Support/Attachment/104810.aspx)
Specify parameter name and click Ok.
![](/Support/Attachment/104812.aspx)
Properties of the Edit object now look like (notice BookName parameter at the bottom).
![](/Support/Attachment/104813.aspx)
Specify the default value for this parameter, e.g. Amsterdam.
To set the book name during test playback in RVL use RVL.SetLocatorOpts action:
![](/Support/Attachment/104814.aspx)
If you are using JavaScript you may simply pass BookName to SeS function.
// Edit default book
SeS('Edit').DoClick();
SeS('Cancel').DoClick();
// Set book name to Saturday
SeS('Edit', {BookName: "Saturday"}).DoClick();
SeS('Cancel').DoClick();
The sample test is available in Rapise Samples repository on GitHub:
https://github.com/Inflectra/rapise-samples/tree/master/DynamicWebLocator