If you are facing such performance issues, you could try to apply some performance optimizations to your test scripts.
BrowserWindow iframe name=1 iframe name=2 iframe name=3 iframe name=4 iframe name=5 iframe name=6 iframe name=7 iframe name=8 iframe name=9
//BrowserApplication//BrowserWindow//IFRAME[@name='6']//IFRAME[@name='8']//input[@name='username']
To interact with the elements from the iframe with the name 8, you need to also include all parent iframes in the Whitelist for iframe support. For this example, type name:6, name:8 into the Whitelist for iframe support field.
You can use the Blacklist for iframe support to disable iframes that you are not interested in, for example iframes for ads.
For example, in the previous iframe structure, if you know that you will never test elements in the iframe with the name 1 or in its child iframes, type name:1 into the Blacklist for iframe support field.
You can completely disable the iframe support by unchecking the option OPT_XBROWSER_ENABLE_IFRAME_SUPPORT.
For example, if all iframes in your application are only used for ads, and you do not want to test any of these iframes, you can use this option.
To enhance the replay performance of find actions, you can adapt the locators to reduce the number of iframe searches. Applying this performance optimization might work very well in combination with using the Blacklist for iframe support or Whitelist for iframe support.
For example, in the previous iframe structure, assume you only want to interact with elements in the iframe with the name 8. You can adapt the Xpath locators or the object map entries to reduce the number of iframe searches.
// .inc file [-] window BrowserApplication WebBrowser [ ] locator "//BrowserApplication" [-] BrowserWindow BrowserWindow [ ] locator "//BrowserWindow" [-] DomElement Username [ ] locator "//IFRAME[@name='6']//IFRAME[@name='8']//input[@name='username']" [-] DomElement Password [ ] locator "//IFRAME[@name='6']//IFRAME[@name='8']//input[@name='password']" [-] DomElement LoginButton [ ] locator "//IFRAME[@name='6']//IFRAME[@name='8']//input[@name='loginButton']"
// .t file WebBrowser.BrowserWindow.Username.TypeKeys("my user name") WebBrowser.BrowserWindow.Password.TypeKeys("top secret") WebBrowser.BrowserWindow.LoginButton.Click()
// .inc file [-] window BrowserApplication WebBrowser [ ] locator "//BrowserApplication" [-] BrowserWindow BrowserWindow [ ] locator "//BrowserWindow" [-] DomElement Username [ ] locator "//IFRAME[@name='6']//IFRAME[@name='8']//input[@name='username']" [-] DomElement Password [ ] locator "//IFRAME[@name='6']//IFRAME[@name='8']//input[@name='password']" [-] DomElement LoginButton [ ] locator "//IFRAME[@name='6']//IFRAME[@name='8']//input[@name='loginButton']"
// .t file, leave the .inc file unchanged WINDOW iframe = WebBrowser.BrowserWindow.Find("//IFRAME[@name='6']//IFRAME[@name='8']") iframe.Find("//input[@name='username']").TypeKeys("my user name") iframe.Find("//input[@name='password']")TypeKeys("top secret") iframe.Find("//input[@name='loginButton']").Click()
// .inc file [-] window BrowserApplication WebBrowser [ ] locator "//BrowserApplication" [-] BrowserWindow BrowserWindow [ ] locator "//BrowserWindow" [-] DomElement Iframe [ ] locator "//IFRAME[@name='6']//IFRAME[@name='8']" [-] DomElement Username [ ] locator "//IFRAME[@name='6']//IFRAME[@name='8']//input[@name='username']" [-] DomElement Password [ ] locator "//IFRAME[@name='6']//IFRAME[@name='8']//input[@name='password']" [-] DomElement LoginButton [ ] locator "//IFRAME[@name='6']//IFRAME[@name='8']//input[@name='loginButton']"
// .t file WebBrowser.BrowserWindow.Username.TypeKeys("my user name") WebBrowser.BrowserWindow.Password.TypeKeys("top secret") WebBrowser.BrowserWindow.LoginButton.Click()