[Katalon recorder] Difference between verifyValue and assertValue

Hi,

In Katalon Recorder, what’s the difference between the command veriftValue and the command assertValue ?

1 Like

According to doc, I think those are quite similar

Oh, I think I missed that part of the doc :thinking:, do you have a link to that part of the doc that I can build on ?

Thanks

As for the Selenium terminology, see Assert and Verify Methods in Selenium | BrowserStack for the difference of “assert” and “verify”.

  • In the case of assertions, if the assert condition is not met, test case execution will be aborted. The remaining tests are skipped, and the test case is marked as failed. These assertions are used as checkpoints for testing or validating business-critical transactions.
  • In case of verification, tests will continue to run until the last test is executed, even if verification conditions are not met.

I don’t know how much Katalon Recorder is compliant to the Selenium terminology.

2 Likes

As for the Selenium terminology, see Assert and Verify Methods in Selenium | BrowserStack for the difference of “assert” and “verify”.

  • In the case of assertions, if the assert condition is not met, test case execution will be aborted. The remaining tests are skipped, and the test case is marked as failed. These assertions are used as checkpoints for testing or validating business-critical transactions.
  • In case of verification, tests will continue to run until the last test is executed, even if verification conditions are not met.

According to the screenshot, it doesn’t work as expected. Did I do something wrong ?

From the doc at:

please note:

During the migration process, KR will remove or transform certain Selenium IDE to make the tests functional.

So, as @kazurayam mentioned, KR will use own implementations of asserts and verify, which most likely do not follow entirely the Selenium IDE behaviour.

From the Selenese commands doc at:

vs

there is no clear explanation on how those behave and the description is same.

So I suppose, the answer from @Elly_Tran is correct, most likely they do the same thing.

Note also, the doc at:

makes no distinction between assert or verify, so I suppose are provided like this just for certain compatibility with Selenium IDE imported scripts.

1 Like

You can read the source code of Katalon Recorder katalon-recorder/old-panel/js/katalon/newformatters/webdriver.js at master · katalon-studio/katalon-recorder · GitHub

At the Line#86 and around:

    ...
    "verifyValue": "expect( $(_BY_LOCATOR_)).toHaveValueContaining(`_VALUE_STR_`)",
    ...
    "assertValue": "expect( $(_BY_LOCATOR_)).toHaveValueContaining(`_VALUE_STR_`)",
    ...

I read this code and understand that “verifyValue” and “assertValue” in KR are implemented just the same. I wonder why KR has the 2 duplicating commands.

I guess that the men who developed KR were not aware of the difference of the 2 commands in Selenium IDE.

2 Likes

They may have presumed it was one of those instances where old and new versions of commands co-existed, and that this was one of those cases, it wasn’t, but it’s how it got implemented.

1 Like