Selectors change in kS after each deployment made by the dev team

@grylion54 @ThanhTo @kazurayam hello dears,

I encounter this problem every moment a deployment is made while I use static selectors to identify an item. but KS changes the selector automatically and suddenly my test fails. KS can not keep the same selector that I had selected before to make the scenario.

Is there a config to do so that KS cannot change my selectors after each deployment? because every time I still have to change the selector so that the test passes.

thank you for helping :frowning:



for example : image

in this screen I use the relative xpath to identify this field the test pass. but after deployment, KS will automatically select the xpath: attributes and the test will be a failure because the selector changed.

@ferrariklersone Do you have “Enable Self-healing execution” checked? If you do, @Russ_Thomas suggests you remove the check–like he has in the image.

I use the free version so far, it seems that this function required payment :frowning:

I use the free version so far, it seems that this function required payment :frowning:

Then you have never enabled Self-healing execution ON.
This means that the Self-healing execution is NOT the cause of your problem.
It has nothing to do with your problem.

What do you mean by saying “deployment” ?

Do you clone a branch from a Git repository from some remote server? Do you mean it a “deployment”?

If it is not, please describe what your “deployment” really is.

If it is, which value among the following 2 do you find for the selector in the repository?

  • //input[@name='j_idt415']
  • //div[@id='bank_reference']/div/input

I guess, in the repository, the selector has the value of //input[@name='j_idt415'].

I guess, you are in the following situation:

  1. You did a “deployment” sometime ago.

  2. since then, you manually changed the selector to //div[@id='bank_reference']/div/input. You executed some tests. You saw the tests passed. You saw it’s good.

  3. you have not do any "git add", "git commit" and "git push".

  4. later, you (or somebody else) do a “deployment” again.

  5. Then you find the selector is changed back to “//input[@name=‘j_idt415’]”. You get surprised.

Is my guess right or wrong?


1- talking about Deployement, I am referring to the dev team pushing the code since the application is in full development, and with each change, the devs commit the code so that the latest updates are applied.

2- you have summed up well the problem that meets about selector that changes every moment, that’s right. once the devs push the code, the selector that was used before, is no longer used, I have to manually enter the new selector to make the script work.


Here you have a chance to contribute to your team.

If you want to avoid this incident(Selectors change in kS after each deployment made by the dev team), you should do “git add”, “git commit” and “git push”. Please talk to your dev team if you should/could do it or not.