private void PopulateFrames(IList <INativeDocument> frames, string tagName) { foreach (JSElement frameElement in AllElements.GetElementsByTag(tagName)) { var frameDocumentReference = frameElement.ElementReference + ".contentDocument"; frames.Add(new FFDocument(ClientPort, frameDocumentReference, frameElement)); } }