Skip to content

Commit

Permalink
Add a integration test for page.query
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur22 committed Nov 16, 2023
1 parent 297f56c commit 6cf6b6a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/element_handle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,3 +439,15 @@ func TestElementHandlePress(t *testing.T) {

require.Equal(t, "AbC", el.InputValue(nil))
}

func TestElementHandleQuery(t *testing.T) {
t.Parallel()

p := newTestBrowser(t).NewPage(nil)
p.SetContent(`<div id="foo">hello</div>`, nil)

element, err := p.Query("bar")

require.NoError(t, err)
require.Nil(t, element)
}

0 comments on commit 6cf6b6a

Please sign in to comment.