How to Verify Partial Text using QAS Custom Step.

In QAS, the verification of Partial Text is only possible using QAS CI/CD mode. Refer to the below steps to verify the Partial Text using Custom Step:

  • Step 1: Adding a Custom Step to verify Partial Text.

    • Navigate to \src\test\java\steps\common\StepsLibrary.java from your Project Root folder. Add the following code block to your 'StepsLibrary.java' file. Refer to the below screenshot and sample code for the same:

 

  • Step 2: Call the Custom Step from the feature file.

    • Export the test case code from Test Recorder to your project. Refer to the help guide for detailed steps.

    • In the exported feature file, call the custom step as shown in the below screenshot.

    • Replace the following parameters;
      {loc} : locator element.
      {text} : partial text that needs to be verified.

 

  • Step 3: Executing the feature file.

    • Execute the test case.

For any further queries, please contact QMetry Support.