Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Start a new test case and navigate to the website https://reference.subject-7.com

  2. While Silent Mode is active, click Capture on the platform

    Image Removed
  3. Click Login link on the page

    Image Removed
  4. A new step with Click command will be added on the platform. Notice that the XPath is absolute.

    image-20240506-155055.pngImage Removed
  5. Switch to Interactive Mode and record the same link one more time

  6. A new step with Click command will be added on the platform. Notice that the XPath is now relative

    image-20240506-155157.pngImage Removed
  7. Stop the recorder by clicking Stop Recording on the platform

  8. Copy the relative XPath from your step and go Generate an XPath for Login link. You can use Recorder to generate one then make small changes, or you can generate one manually. For example: //a[text()='LOGIN']

    Image Added
  1. Add the XPath to XPath Templates by going to Repository > XPath Templates on the platform

  2. Create a new XPath Template and replace LOGIN with $LABEL. Save the XPath Template and close it

...

  1. image-20240507-115010.pngImage Added
  2. Click Record on the platform to start recording this element using the XPath Template

  3. Your new step will now

...

  1. show the XPath which was used from your XPath Template

...