mabl makes testing iframes as easy as testing any other part of your app. Read below to learn more about the best ways to test in iframes.
To interact with a regular click, just click into the iframe as you normally would interact with any other element on your website. mabl will automatically recognize the interaction with the iframe, and will add a "switched context to iframe" step right before the action you recorded. When you interact with the rest of your website, mabl will display a "switched context to root frame" message so you can be sure mabl is interacting with the correct elements.
If you're using custom finds with XPath or CSS selectors, you need to be sure that mabl is looking in the correct frame. Before recording the custom find, be sure to click into the iframe you'd like to test. This will create a "switched context to iframe" step which tells mabl which frame to test. Once you've done this, just record your XPath or CSS selector as you normally would. Remember to switch context back to the rest of the website if you'd like to change which frame you're testing in.
Interacting with nested iframes is mostly the same as interacting with any other iframe with the Trainer. You'll simply see an additional "switched context to iframe" message for each extra iframe you're interacting with. There's no need to treat these iframes any differently than other iframes within your app.
Updated about 2 years ago