Lot of times the OK button on the application pop ups is not clicked by the step at right place . The tool tends to click it on left or right and sometimes it clicks but the tool assumes it is not clicked and keeps looking/waiting for the button.
These strange behaviors with OK button are experienced for a while now and varioius debugging techniques have been tried but failed. Could you please help me to figure out a more robust clicking technique on this.
3 Answers, 1 is accepted
Thank you for contacting us on this matter and providing initial feedback for the issue you are facing.
Based on the information you provided, we need to get a little more details about your application:
- is it a web application or it is a wpf application?
- this OK button is it inside the application or it is a dialog with OK button?
Assuming it is a WPF application and not a dialog:
For WPF applications, when you record click on buttons it records the click itself with some coordinates as it was clicked exactly at the time of recording. Then on execution it seems to clicks right or left of the center of the button. If this is the case, you can fix it with setting the Click step property Offset to unchecked (see attachment).
The other cases when it fails waiting for the button, probably error is Unable to locate element. Can you please send us more information about the error log of the step, so we can advise you on further actions?
Also you mentioned you have tried different debugging techniques without success. Can you please share what you have tried and what the outcome was, because it could be something small you are missing to make it right?
Thank you in advance for your cooperation,
Any additional information, screen shots, videos and above requested data will help us find you solution faster.
Hi Daniel ,
Thanks for Your feedback and good explanation.. The Application is a web Application and the ok button is mostly inside the dialog Box or popup..
Techniques tried :
1. Not clicking the ok button - I try to delete the element and add as a New element..
Sometimes I "Add the elements to repository" by highlighting the elements..
And Sometimes I used to add the step "Left click on ok button tag" using the Quick steps..
2. Clicked the button.. But still the step is waiting for button to exists - Tried by adding execution delays and Focus on the elements before actually clicking the element..
Even after trying all this, One or Other time the step failes With the error saying "Ok button is not found " or "It still wait for the element"
Could you please help on this.
Thank you for clarifying what kind of application you are testing.
In order to continue investigating this issue and try to provide a solution for you, I will need some additional details about the application and the recorded test. If you are not comfortable with disclosing this information in the public forum, please create a private ticket and share the required details below.
- Please run the test, as it is recorded and do not click or press any keys manually. Once the test fails, export the step failure details and attach them to this thread or the new ticket (see exportStepFailureDetails.png).
- I want to check the element's find expressions and properties and to do that I will need the .tstest file, located in the project root folder. Please attach it as well.
- I believe that you are using an older version of Test Studio. Could you please specify which is the exact release, that you currently have? I would suggest to update it to the latest version 2019.2.619.0, because it has the latest fixes and features like combined find expression that uses images. It is very helpful, when the elements have dynamic attributes.
I am looking forward to hearing from you and continue investigating this issue further.