1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-06-27 00:41:09 +02:00

Feature/#220 iframe support (#315)

* Refactored Virtual DOM structure
* Added new E2E tests
* Updated E2E Test Runner
This commit is contained in:
Tim Voronov
2019-06-19 17:58:56 -04:00
committed by GitHub
parent 8c07516ed1
commit d7b923e4c3
103 changed files with 2815 additions and 1629 deletions

View File

@ -20,8 +20,8 @@ func Hover(ctx context.Context, args ...core.Value) (core.Value, error) {
return values.None, err
}
// document or element
err = core.ValidateType(args[0], drivers.HTMLDocumentType, drivers.HTMLElementType)
// page or document or element
err = core.ValidateType(args[0], drivers.HTMLPageType, drivers.HTMLDocumentType, drivers.HTMLElementType)
if err != nil {
return values.None, err
@ -40,6 +40,12 @@ func Hover(ctx context.Context, args ...core.Value) (core.Value, error) {
}
switch n := args[0].(type) {
case drivers.HTMLPage:
if selector == values.EmptyString {
return values.None, core.Error(core.ErrMissedArgument, "selector")
}
return values.None, n.GetMainFrame().MoveMouseBySelector(ctx, selector)
case drivers.HTMLDocument:
if selector == values.EmptyString {
return values.None, core.Error(core.ErrMissedArgument, "selector")