diff --git a/pkg/drivers/http/element.go b/pkg/drivers/http/element.go index a2e69322..710874f0 100644 --- a/pkg/drivers/http/element.go +++ b/pkg/drivers/http/element.go @@ -468,9 +468,9 @@ func (el *HTMLElement) CountBySelector(_ context.Context, selector values.String } func (el *HTMLElement) ExistsBySelector(_ context.Context, selector values.String) (values.Boolean, error) { - selection := el.selection.Closest(selector.String()) + selection := el.selection.Find(selector.String()) - if selection == nil || selection.Length() == 0 { + if selection.Length() == 0 { return values.False, nil }