Rename SetVisible to SetHidden for clearer semantic meaning

The method and its implementation now align with setting an element's "hidden" property instead of "visible." This change improves code clarity and consistency with expected behavior.
This commit is contained in:
Steve Dudenhoeffer 2025-03-03 23:39:37 -05:00
parent 62cb6958fa
commit 0f9f6c776d

View File

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