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
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.
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.
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.
Alright. Thanks for the advice!