Skip to content

Commit

Permalink
Fix Page|EHandle.Tap linter warns
Browse files Browse the repository at this point in the history
  • Loading branch information
inancgumus committed Apr 17, 2024
1 parent cc8d06b commit 5e9318f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/element_handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -1290,6 +1290,7 @@ func (h *ElementHandle) setInputFiles(apiCtx context.Context, payload []*File) e
return nil
}

// Tap scrolls element into view and taps in the center of the element.
func (h *ElementHandle) Tap(opts goja.Value) {
parsedOpts := NewElementHandleTapOptions(h.defaultTimeout())
err := parsedOpts.Parse(h.ctx, opts)
Expand All @@ -1308,7 +1309,7 @@ func (h *ElementHandle) Tap(opts goja.Value) {
applySlowMo(h.ctx)
}

func (h *ElementHandle) tap(apiCtx context.Context, p *Position) error {
func (h *ElementHandle) tap(_ context.Context, p *Position) error {
return h.frame.page.Touchscreen.tap(p.X, p.Y)
}

Expand Down
1 change: 1 addition & 0 deletions common/page.go
Original file line number Diff line number Diff line change
Expand Up @@ -1190,6 +1190,7 @@ func (p *Page) SetViewportSize(viewportSize goja.Value) {
applySlowMo(p.ctx)
}

// Tap will tap the element matching the provided selector.
func (p *Page) Tap(selector string, opts goja.Value) error {
p.logger.Debugf("Page:SetViewportSize", "sid:%v selector:%s", p.sessionID(), selector)

Expand Down

0 comments on commit 5e9318f

Please sign in to comment.