diff --git a/e2e/tests/dynamic/doc/iframes/lookup.fql b/e2e/tests/dynamic/doc/iframes/lookup.fql new file mode 100644 index 00000000..26fef4cf --- /dev/null +++ b/e2e/tests/dynamic/doc/iframes/lookup.fql @@ -0,0 +1,10 @@ +LET url = @dynamic + "?redirect=/iframe" +LET page = DOCUMENT(url, { driver: 'cdp' }) + +LET frames = ( + FOR frame IN page.frames + FILTER frame.name == "nested" + RETURN frame +) + +RETURN EXPECT(1, LENGTH(frames)) \ No newline at end of file diff --git a/pkg/drivers/common/getter.go b/pkg/drivers/common/getter.go index e6a5e3d7..3a92bd4e 100644 --- a/pkg/drivers/common/getter.go +++ b/pkg/drivers/common/getter.go @@ -94,6 +94,8 @@ func GetInDocument(ctx context.Context, doc drivers.HTMLDocument, path []core.Va switch segment { case "url", "URL": return doc.GetURL(), nil + case "name": + return doc.GetName(), nil case "title": return doc.GetTitle(), nil case "parent":