1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-14 11:23:02 +02:00

Added missed property in Document getter

This commit is contained in:
Tim Voronov 2019-07-17 18:41:57 -04:00
parent e280005204
commit ddfb7a20e8
2 changed files with 12 additions and 0 deletions
e2e/tests/dynamic/doc/iframes
pkg/drivers/common

View File

@ -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))

View File

@ -94,6 +94,8 @@ func GetInDocument(ctx context.Context, doc drivers.HTMLDocument, path []core.Va
switch segment { switch segment {
case "url", "URL": case "url", "URL":
return doc.GetURL(), nil return doc.GetURL(), nil
case "name":
return doc.GetName(), nil
case "title": case "title":
return doc.GetTitle(), nil return doc.GetTitle(), nil
case "parent": case "parent":