Scrolling
To mimic the execution of pure manual tests, where a user would normally always scroll to the element before interacting with it, msg.ZenTestAI will try to perform automatic and intelligent scrolling where possible.
In case the automatic scrolling does not work as you would expect, you can always perform the scrolling manually by using the "scroll to" action. Example: "Scroll to the section with the title 'My Title'".
Browser development allows scroll bars at multiple levels (i.E. window, element, ...). msg.ZenTestAI will recursively identify the closest scrollable element and scroll to it. Example:
- You have a scrollable table inside a scrollable page and you want to interact with a row in the table. Both the table and the row are not visible in the viewport.
- msg.ZenTestAI will scroll to the table first and then to the row.
Automatic scrolling can be configured in the application settings of the page.
Scrolling on Action
Every action done on elements (i.E. click, type, ...) will automatically scroll to the element if it is not visible in the viewport.
Scrolling on Assertions
While doing manual tests it is natural to scroll to the element before verifying its content. Example: You have a manual test step, which says "Verify that the table contains the row with the name 'John Doe'". You would normally scroll to the table before verifying the content.
msg.ZenTestAI tries to mimic this behavior by doing the following steps:
- When you do an assertion on an element, msg.ZenTestAI will try to scroll to the element before verifying the content.
- When you do an assertion on a section of the page (i.E. a table) msg.ZenTestAI will manipulate this section to display it in the full width and height before verifying the content.
- When you do a generic assertion and you have a scrollable page, msg.ZenTestAI will work on a full page screenshot up to 3000x3000 pixels.
Scrolling to "virtual tables"
In case you are working with virtual tables (i.E. tables that are loading data on scroll), msg.ZenTestAI can not scroll automatically as it can only work on data available in the DOM tree. Please try to design your tests in a way that the data is already loaded before you interact with it. In case you have to scroll in such a virtual table, you have to explicitly tell msg.ZenTestAI to scroll to the element by using the "scroll to" action (i.E. Scroll to row 200 in the table).
Scrolling in virtual tables is a very data-intensive action, and will take a lot of time to execute.