# Best practices
When working with Virtuoso, it is important to have an understanding of Virtuoso's architecture and how it works in the background. In this section we briefly describe Virtuoso's internal concepts and provide details on how this might affect you or your application.
# Virtuoso's internals
Virtuoso has a distributed multi-tenant architecture to enable horizontal scaling in the cloud. An essential part of this distributed network is Virtuoso's bot cluster. Bots enable Virtuoso to quickly (in parallel) execute tests.
Firewall configuration
It is typical of firewalls and rate-limiters to consider many parallel requests from same/similar sources to be a potential Denial-of-Service(DoS) attack.
Virtuoso is cloud-based and performs smart dynamic scaling in the background to match resources and demand. Given that this process is done using intelligent adaptive algorithms, executions may be processed with different capacities at different times of day, and so, the processing duration may vary as we dynamically scale our cloud.
See Quotas and thresholds for more information about limits that may be applied to test executions in Virtuoso.
# Application considerations
In software engineering, Software testability plays a significant role in the effectiveness and efficiency of software testing efforts. This is the case for Virtuoso as well. If your application relies on many non-standard features and does not follow best practices in web development, this may also affect the quality of testing with Virtuoso.
# Dealing with iframes
When interacting with elements inside iframes, you may face challenges, such as: jumping inside and outside of an iframe, page navigations inside iframes, element highlights being mispositioned, etc.
As a best practice, we recommend that you:
- Make sure you first
switch
to the iframe; - If you face problems with making more interactions, first
switch to parent frame
, and then switch back into the iframe;- On Safari browser, this back and forth switching is required after each interaction against an iframe, since the browser loses the iframe handle once it navigates to a different page;
- If an element you were looking for does not seem to be visible to Virtuoso, note that it might be inside a nested iframe, or on a different iframe -- use DevTools to investigate this further;
- If the element highlighted on your screenshot is misaligned, increase the height of your goal, such that your iframe fits within the page.
Switching a tab always resets the context to the main frame, so if you switch back to a tab that had its last interactions within an iframe and want to continue interacting with elements inside it, you will need to switch to that iframe again.
When highlighting elements inside iframes, Virtuoso will intelligently auto-correct the position of the elements relative to the browser window. However, this is only available in the execution screenshot view, and the following features may show an incorrect element positioning:
- Healed element screenshot;
- Root cause analysis screenshot;
- One-click to fix element support;
- Element screenshot in the timeline tab.
While working with shadow DOM, you should be aware that switching to an iframe that is inside a shadow root will not work (see our FAQ entry "How do I interact with elements inside a Shadow DOM?").