Our application utilizes iframes that are not immediately available (for mouseover selection) when recording a test in Test Studio Express. When attempting to grab an HtmlButton (or similar) to validate the control is visible, a new Page is added to Elements Explorer, then a Frame element, then finally the HtmlButton.
My issue with this is the iframe has a generated ID ("client_new_12345678"), so the child HtmlButton will never again be found. I have used the DOM Explorer to find the iframe and manually add it to the Element List, then used the Find Element feature to setup a find expression (tagname is exactly iframe, id starts with client_new_). While this HtmlFindExpressionElement works for use with the Step Builder with suggested Actions and Verifications, it does not generate a Frame object with child objects I can perform other verifications with.
What has worked for me (Pages hierarchy generated through record):
HtmlAnchor MarginLink = Pages.Product.Frame1.MarginLink;
Using the above model and the iframe I manually added to the Element List, I've unsuccessfully attempted:
HtmlControl frame = Pages.Product.New_IFrame;
Element buttonSelect = frame.Find.ByAttributes(
Always fails as this is always null --> buttonSelect.Wait.ForExists().
, I've found there are no children. I understand there are no objects generated under Pages, but how can I go about accessing the DOM and performing actions against items I'm looking for under elements with generated names that don't exist until run time?