diff --git a/node.go b/node.go index 4730f0e..000c6a0 100644 --- a/node.go +++ b/node.go @@ -21,7 +21,7 @@ type Node interface { ForEach(selector string, fn func(Node) error) error - SetVisible(val bool) error + SetHidden(val bool) error SetAttribute(name, value string) error } @@ -86,8 +86,8 @@ func (n node) ForEach(selector string, fn func(Node) error) error { return nil } -func (n node) SetVisible(val bool) error { - _, err := n.locator.Evaluate(fmt.Sprintf(`(element) => element.visible = %t;`, val), nil) +func (n node) SetHidden(val bool) error { + _, err := n.locator.Evaluate(fmt.Sprintf(`(element) => element.hidden = %t;`, val), nil) return err }