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

randomly panic #1133

Open
Q191 opened this issue Oct 26, 2024 · 2 comments
Open

randomly panic #1133

Q191 opened this issue Oct 26, 2024 · 2 comments
Labels
needs info The description is not enough to tackle the problem question Questions related to rod

Comments

@Q191
Copy link

Q191 commented Oct 26, 2024

Rod Version: v0.116.2

The code to demonstrate your question

  1. Clone Rod to your local and cd to the repository:

    git clone https://github.com/go-rod/rod
    cd rod
  2. Use your code to replace the content of function TestRod in file rod_test.go.

  3. Test your code with: go test -run TestRod, make sure it fails as expected.

  4. Replace ALL THE CONTENT under "The code to demonstrate your question" with your TestRod function, like below:

const EDGE_BINARY_PATH = "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"

func main() {
	l := launcher.New().Bin(EDGE_BINARY_PATH).Headless(true)
	lUrl := l.MustLaunch()
	browser := rod.New().ControlURL(lUrl).Trace(true).MustConnect()
	page := browser.MustPage("https://github.com/go-rod/rod")
	defer func() {
		page.Close()
		page.Browser().Close()
		l.Cleanup()
	}()
        page.MustElement("xx") 
	time.Sleep(10 * time.Second)
}

What you got

randomly panic

image

image

What you expect to see

no panic

What have you tried to solve the question

@Q191 Q191 added the question Questions related to rod label Oct 26, 2024
@Q191 Q191 changed the title panic randomly panic Oct 26, 2024
Copy link

Please fix the format of your markdown:

36 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## What you got"]

generated by check-issue

@ysmood
Copy link
Member

ysmood commented Oct 26, 2024

Can you be more specific?

@ysmood ysmood added the needs info The description is not enough to tackle the problem label Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info The description is not enough to tackle the problem question Questions related to rod
Projects
None yet
Development

No branches or pull requests

2 participants