How to get iframe address in geckofx?

694 views Asked by At

How do I get same information about iframe like in browser properties when you right-click the element but programmatically? I need Address and Referring URL.

iframe properties

1

There are 1 answers

0
Bartosz On BEST ANSWER

you can get the frame by name of by tag name (both return a collection and require indexer or linq).

From there, you can access the properties, e.g. Src is the url for the frame.

GeckoFrameElement frame = this.Document.GetElementsByTagName("frame")[0] as GeckoFrameElement;
var address =  frame.Src;