Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignoring the error "element's pointer-events is none" #1028

Open
CryptoVolting opened this issue Mar 17, 2024 · 2 comments
Open

Ignoring the error "element's pointer-events is none" #1028

CryptoVolting opened this issue Mar 17, 2024 · 2 comments
Labels
question Questions related to rod

Comments

@CryptoVolting
Copy link

Rod Version: v0.114.8

How to ignore this error or how to write similar code so that the error does not occur? Because in my conditions, the button often disappears before I can click on it.

el, err := page.Sleeper(rod.NotFoundSleeper).Element(selector)
		if errors.Is(err, &rod.ElementNotFoundError{}) {
		} else if err != nil {
			panic(err)
		} else {
			el.MustClick()
		}

error "element's pointer-events is none"

The same error occurs in this case as well:

page.MustElement(selector)MustClick()		

That means I need the script to continue its work even if the element is not present. Perhaps with this library, I can get the position of the element (X, Y) to press it with a mouse click? However, so far I have not found a way to do this...

@CryptoVolting CryptoVolting added the question Questions related to rod label Mar 17, 2024
Copy link

Please fix the format of your markdown:

13 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"]

Please fix the golang code in your markdown:

@@ golang markdown block 1 @@
4:27: expected ';', found MustClick
5:2: expected ';', found 'EOF'
5:2: expected '}', found 'EOF'

generated by check-issue

@ysmood
Copy link
Collaborator

ysmood commented Mar 18, 2024

	point := page.MustElement(selector).MustShape().OnePointInside()
	page.Mouse.MustMoveTo(point.X, point.Y).MustClick(proto.InputMouseButtonRight)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions related to rod
Projects
None yet
Development

No branches or pull requests

2 participants