T
T
Talik2017-01-31 17:25:22
Automation
Talik, 2017-01-31 17:25:22

Why is the same button located differently when testing Sahi 4?

Background!
Once upon a time there was a test stand and autotests written in Sahi 4 were running on it.
One fine day, the stand died, because it was disconnected from the network.
Some time later, all data, all applications and databases were transferred from the test bench server to a new test bench.
After the reconfiguration, the tests began to run happily again, with the exception of a few.
And the reason was that the button labeled "Choose" was not on the user selection form.
The form itself is a standard form for filling in a type field: customer, responsible, etc. Nothing chic, just a full name, and two buttons "Select" and "Cancel".
Tests previously found a button on this form perfectly, which is standard for all similar fields in the following way: _click(_span("Select")).
Now it is located only at the first filling of any field of the type. It doesn't matter what order you fill it in.
By the method of scientific poke, I corrected a number of tests by changing the search to
_click(_span("Select[1]")) and _click(_span("Select[2]")).
It is not clear why what worked before does not work now, and the code did not change in this application. It seems even the code started working in some tests. But it was not there....!!!!
There are tests where these fields are filled in for the first time, then they are edited (that is, the full name is reselected), etc. The Select buttons work only for the first run. After the second run in a row, the select button, which was located by _click(_span("Select[1]")) in the first run, is no longer located.
Who faced and knows the reason for this behavior? what is the problem with this behavior?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question