TestProject Forum

After running the test, the two Xpath locators were swapped

Hi,
I’m a beginner in a test project. I found a mysterious behavior.

I want to evaluate whether the specified text is included in the multi-column dropdown. So I defined two locators in XPATH.
Before executing the test, the locators were defined in the order of A-> B, but when the test is completed, it will be replaced with B-> A.

Needless to say, the Automation Assistant setting is off.

Is this behavior a bug or is there a problem with its usage?
Or is it anything I don’t have to worry about?

The test agent is 3.4. Help me please.

Hi Kara3,

There are different ways to check if text exists. You can use existing Actions in TestProject as Is Present?

image

This step will pass if the text exists or fail if doesn’t exist. you can also set your script behavior what do you want to do if it fails.

You can also use conditions with Parameters. you can create a flag parameter and check for the conditions.
You should try using one locator only. If you want to check if the specified text exists, you can use Advanced Options-> Conditions

Hopefully this helps you.
Thanks,
PS

Hi, pratima.sharma

Thank you for your answer.
I would like to try it by using only one locator.

The search string is in the dropdown list (dynamic text) .
I will try to see if this method works in this situation as well.