Match Unnamed Fields by XPath

When managing an Unnamed Field, you can choose to identify it by XPath instead of CSS selectors. Here is how to do that:

  • Right-click on the input element that you want to manage, then go to Fake Data submenu and choose "Manage Field" option
  • In the newly opened popup, press on the Edit Selector button, which looks like this:
  • Optional: If you don't see the button, you are most probably editing a Named Field, and need to toggle the Save Field as Unnamed Field checkbox.
  • In the new dialog that opens, add your XPath to the Element Selector field, and make sure the Evaluate selector as XPath checkbox is selected, then press the green "Validate" button.
  • If the element that you are managing matches the XPath you typed, the dialog should close.
  • Once finished, press the green Save button, and you will be taken back to your form page.
  • Now you should be able to fill any similar input fields on the page that matches the XPath you used in the previous steps.

Note on performance

It's worth mentioning that evaluating XPaths is not as fast as evaluating CSS selectors. If you have too many Fields that are using XPath, there are chances that Fake Data might become slower on identifying the best match for your inputs.

Below is a quick demo showing all steps described above: