This is a migrated thread and some comments may be shown as answers.

Scripts click events failing with new Trail version

6 Answers 14 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vimala
Top achievements
Rank 1
Veteran
Vimala asked on 24 Apr 2020, 02:56 PM

Hi, 

While running test scripts the click events are failing, which were worked fine when i had recorded. Now, i have installed new trail version, after wards the scripts getting failed at click events. Can you please assist me how to fix these problems.

 

I have attached screenshots for reference,Please find the attachments. Thanks in Advance.

 

 

Thanks & Regards

Srilatha

 

6 Answers, 1 is accepted

Sort by
0
Plamen Mitrev
Telerik team
answered on 28 Apr 2020, 12:04 PM

Hi Vimala,

I will try to help you get those tests executing successfully. To do that I will need your help with some additional details about the failed steps. Please follow up on the topics below.

  • Execute the failing test without continue on failure option and open the generated step failure details. You can analyze them to see what kind of error is causing the issue and attach the exported details (see exportStepFailureDetails.png), so I can also have a look. It is possible that the test execution is unable to find the target element on the page.
  • Turn on the annotations for quick execution and run the test once again. This time each element and action will be highlighted, so you can see if there is anything strange or incorrect happening during the execution. Please let me know if the issue is consistently reproduced and whether you see anything unexpected.
  • It will be helpful for me to analyze a sample web test that reproduces the issue. Please open the Test Studio project's root folder and zip the .tstest file that is associated with the failing test. Although, I will not be able to execute the test on my end, please attach it to this thread for me to investigate.

I hope that with the above details and the further investigation, we can find out what is causing those clicks to fail and fix the issue. 

Thank you for your cooperation in advance.

Regards,
Plamen Mitrev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Vimala
Top achievements
Rank 1
Veteran
answered on 05 May 2020, 08:07 AM
Hi Plamen Mitrev,

Thank you for your quick reply.

I have executed the scripts without continue on failure then i found 2 issues. Please go through them.
1. The text was not entering in the field which i have given the text while recording, before it used to enter  the text correctly while running script.
For this issue I have attached the script which is Basic S&C Cust and attached the Failure details from View log.
2. I have recently modified the script in new trail version which was executed correctly when i modified it, but now it was failing. The click event of the line was showing like the line got passed but it was not clicking the exact position when i kept the click, for example i added click event inside the grid to click but it is clicking out side the grid and still showing as that line got passed, As the click not clicking correctly the remaining lines which need to be executed were failed.
For this I have attached New Invoice script, In that the 83rd step executed showing as passed but it was not clicked correctly.
If you need any further details please do let me know. 
Thanks in Advance.




Thanks & Regards
Vimala

0
Vimala
Top achievements
Rank 1
Veteran
answered on 05 May 2020, 08:12 AM

 

Hi Plamen Mitrev,

Thank you for your quick reply.

I have executed the scripts without continue on failure then i found 2 issues. Please go through them.
1. The text was not entering in the field which i have given the text while recording, before it used to enter  the text correctly while running script.
For this issue I have attached the script which is Basic S&C Cust and attached the Failure details from View log.
2. I have recently modified the script in new trail version which was executed correctly when i modified it, but now it was failing. The click event of the line was showing like the line got passed but it was not clicking the exact position when i kept the click, for example i added click event inside the grid to click but it is clicking out side the grid and still showing as that line got passed, As the click not clicking correctly the remaining lines which need to be executed were failed.
For this I have attached New Invoice script, In that the 83rd step executed showing as passed but it was not clicked correctly.
If you need any further details please do let me know. 
Thanks in Advance.




Thanks & Regar

 

 

0
Plamen Mitrev
Telerik team
answered on 05 May 2020, 02:03 PM

Hi Vimala,

Thank you for sharing the recorded tests and details about the issues you are experiencing. I will share my thoughts and suggestions below, based on those details.

  1. The execution log shows that the test failed to find the target element "Text" in the current DOM tree of the application under test. The test is using a find logic to identify the element on the page and perform the necessary action. Maybe the page was updated or changed and that find logic needs to be changed. You can explore the element's find logic and adjust it, so that the test can reliably find that element. Another option for you, is to record step 5 again and here are the steps to do so:
    - select step 4 and right click on it;
    - choose Run -> To Here;
    - when the browser executes all necessary steps, Test Studio will attach the recorder to it;
    - record the necessary action again;
    - remove or disable the previous step, that was not working, if the new one is working.
    If you continue to experience any troubles, please export the full step failure details (see attached screenshot from my previous reply) and attach the generated archive to your next reply, along with the updated .tstest file.
  2. I will need your help to investigate this misbehavior further. Please share more details on the following.
    - Which is the click action that is not working as expected?
    - Please execute the test and export the full step failure details. Then attach the archive to your next reply, so I can analyze the behavior and inspect the DOM tree at the moment of failure.
    - You can analyze the behavior during test execution, by enabling the annotations. That way you will see where on the screen a click action happens, during the test execution, and that could help with troubleshooting this issue.
    As a side note, I wanted to mention that the test "1#New Invoice" has some unnecessary and duplicated steps, which might be causing issues. For example, Test Studio does not rely on, nor utilize the Tab keypress actions. Every action in the test is associated with a specific element on the page and you do not need to navigate using the Tab or arrow keys.

I hope the above details will help you adjust the existing tests and they will execute reliably. We can work together to fix any remaining issues. To do that effectively, I rely on your cooperation with additional details and resources.

Thank you for your cooperation in advance.

Regards,
Plamen Mitrev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Vimala
Top achievements
Rank 1
Veteran
answered on 06 May 2020, 07:49 AM

Hi Plamen Mitrev,

Thank you for the reply.

Whatever you asked for the 2nd point here are the details.
The Script which is getting failed at line No. 83 and also I'm providing a screen shot of the recorded click event,
test script and exported the failure details. Please find the attached files.

and also thanks for the suggestions you have given for tab off / arrow keys, will implement those on my script.

 Thanks in Advance.

 

 

Thanks & regards

Vimala

 

 

 

 

0
Plamen Mitrev
Telerik team
answered on 06 May 2020, 11:04 AM

Hello Vimala,

I analyzed the shared details about the second point and I will share my thoughts and suggestions below, based on those details.

As you mentioned, step 83 is successfully executed and the test continues further to try and extract the value of the target element. I noticed that the find expression for element "InvoceDiv", which is used in step 83, uses TagIndex as a filter. This is usually not recommended, because some structural changes to the application can affect the test execution and cause it to fail. Please edit those elements and check for other attributes (like id, class or TextContent) that can help make the find expression more stable. This applies for other elements in your test, as well.

Currently, the click action in step 83 happens against the second <div> tag, which is under the <kendo-grid> element. It seems to me that this is the header of the grid and I am not sure what it should actually click. Please review the element's find expression, as suggested above, and change it accordingly. You could also try to record the necessary action again, if there were any changes to the application after the initial recording.

The step after the click fails to find the target element on the page. I analyzed its find expression and that element does not exist in the DOM tree. I assume that, when you configure the previous step to click the expected element, the test will proceed successfully.

Please follow the above suggestions and make sure that the execution is able to find and act against the correct element that is expected for your test scenario. In case the issue persists, please share the following details.

  • A video recording of the test execution, with annotations turned on.
  • Which element on the page should be clicked at step 83? Does this click have to open another page, or change the content of the current page in any way? Please share screenshots, so I can get a better understanding of the test scenario you want to automate and the behavior of the application.
  • Please consider sharing temporary access to the application under test. That way I will be able to troubleshoot it directly on my end and advise you further.

I am looking forward to hearing from you.

Regards,
Plamen Mitrev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
General Discussions
Asked by
Vimala
Top achievements
Rank 1
Veteran
Answers by
Plamen Mitrev
Telerik team
Vimala
Top achievements
Rank 1
Veteran
Share this question
or