Skip to content

Commit

Permalink
all the actions of an element should use its own context
Browse files Browse the repository at this point in the history
fix #842
  • Loading branch information
ysmood committed Mar 21, 2023
1 parent c448d2f commit 4bbe74c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion query.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ func (el *Element) ElementX(xPath string) (*Element, error) {

// ElementByJS returns the element from the return value of the js
func (el *Element) ElementByJS(opts *EvalOptions) (*Element, error) {
e, err := el.page.Sleeper(NotFoundSleeper).ElementByJS(opts.This(el.Object))
e, err := el.page.Context(el.ctx).Sleeper(NotFoundSleeper).ElementByJS(opts.This(el.Object))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 4bbe74c

Please sign in to comment.