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

StepWaitOnElementsTimeout limit

4 Answers 20 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Yan Jun
Top achievements
Rank 1
Veteran
Yan Jun asked on 12 Sep 2019, 03:19 AM

Hi. I am wondering if there is a limit to the UseStepWaitOnElementsTimeout?

I am trying to wait for a text content while importing a file.The attached image is the recorded steps.

Normally this file import will take less than 30 mins but I do not want to delay execution for a fixed duration.

What I am trying to do here is that I want to wait until text content "Completed with skipped records" appears then proceed with further verification.

But it seems like Test Studio did not wait for timeout until 1,800,000ms. Another attached image is the execution log.

Do I use WaitOnElements correctly in this case?

4 Answers, 1 is accepted

Sort by
0
Accepted
Elena
Telerik team
answered on 16 Sep 2019, 08:15 AM
Hi Yan,

Thanks for sharing details on the scenario you need to cover. 

The different steps in Test Studio has multiple properties and also some of them changing depending on the step type. This can be confusing in some situation and therefore we have added some additional description at the bottom of the Properties pane for the currently selected property. 

Anyways, let me get to the point of this discussion - the WaitOnElementsTimeout, which you have enabled will wait for the target element to exist in the DOM tree. Thus, there is no delay in failing the test despite the set timeout, as the element is present on the page but its text content is not yet the expected. 

So, that timeout can be used in a situation, when the global wait timeout set for the quick execution, will not be sufficient for an element to appear on the page. 

For the current case - where you need to wait longer time for the text content to change, you can use the property named Timeout. This will increase the interval of waiting for the conditions of the particular step - in this case wait for the text content to change. 

Please, give this a try and let me know if this covers the test script requirements or further assistance is required. 

Thank you in advance for your cooperation. 

Regards,
Elena
Progress Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Yan Jun
Top achievements
Rank 1
Veteran
answered on 18 Sep 2019, 04:30 AM

Hi Elena,

Thanks for your explanation on the difference between global element time out, step time out and step element wait time out. I am aware of the differences now.

I have tried based on your suggestion as per attached image and I found that:

1. To achieve waiting for TextContent "Completed with Skipped Records", I need to enable both UseStepWaitOnElementsTimeOut and step Time Out (in Step Properties) at the same time. This will successfully wait until TextContent "Completed with Skipped Records" appear then proceed with the next steps.

2. If I only use step Time Out (in Step Properties) without enabling UseStepWaitOnElementsTimeOut, then I will hit "Unable to find element by Find Expression" error.

3. If I only enable UseStepWaitOnElementsTimeOut without step Time Out (in Step Properties) then the issue I raised above happens.

So is it right that, to achieve the goal of waiting for TextContent "Completed with Skipped Records" to appear, I need both step Time Out (in Step Properties) and UseStepWaitOnElementsTimeOut?

I have attached screenshot for my Step Properties for scenario no. 1 and execution log for scenario no. 2.

Regards,

Yan Jun

0
Elena
Telerik team
answered on 19 Sep 2019, 08:18 AM

Hello Jan,

As I am not familiar in details with the application under test, my suggestions may not completely cover the requirements. Therefore I share details for any related topics, so that you can sort out what will be needed for the particular test and application. 

I am pleased to know you managed to handle the test script run when using the two timeouts together - since this is what is required, it is correct for the current occasion.

Thanks for your cooperation.

Regards,
Elena
Progress Telerik

 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Yan Jun
Top achievements
Rank 1
Veteran
answered on 19 Sep 2019, 08:36 AM

Hi Elena,

Alright. Thanks for the advice!

Regards,

Yan Jun

Tags
General Discussions
Asked by
Yan Jun
Top achievements
Rank 1
Veteran
Answers by
Elena
Telerik team
Yan Jun
Top achievements
Rank 1
Veteran
Share this question
or