1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-07-05 00:49:00 +02:00

Added Context to HTML methods (#235)

* Added Context to HTML methods

* Fixed unit tests

* Updated timeout

* Fixed WAIT_CLASS timeout
This commit is contained in:
Tim Voronov
2019-02-20 21:24:05 -05:00
committed by GitHub
parent 34c8c02258
commit 6e15846d0f
45 changed files with 415 additions and 446 deletions

View File

@ -12,7 +12,7 @@ import (
// @param source (Document) - Document.
// @param selector (String) - Selector.
// @returns (Boolean) - Returns true if matched at least one element.
func ClickAll(_ context.Context, args ...core.Value) (core.Value, error) {
func ClickAll(ctx context.Context, args ...core.Value) (core.Value, error) {
err := core.ValidateArgs(args, 2, 2)
if err != nil {
@ -34,5 +34,5 @@ func ClickAll(_ context.Context, args ...core.Value) (core.Value, error) {
return values.None, err
}
return doc.ClickBySelectorAll(values.NewString(selector))
return doc.ClickBySelectorAll(ctx, values.NewString(selector))
}