We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Could you give an example code of "PageAddScriptToEvaluateOnNewDocument"? I want to change the value of "window.navigator.webdriver"!
The next line will cause automation to stop page.Eval(() => Object.defineProperties(navigator, 'webdriver', {get: () => undefined}))
() => Object.defineProperties(navigator, 'webdriver', {get: () => undefined})
The text was updated successfully, but these errors were encountered:
func Example () { page := browser.Page("") proto.PageAddScriptToEvaluateOnNewDocument{ Source: `console.log("ok")` }.Call(page) page.Navigate("https://github.com") }
Sorry, something went wrong.
@pu369 your code itself is not valid js, you'd better check the error output and fix your syntax first. The code below works fine for me.
page.Eval(`() => Object.defineProperties(navigator, { webdriver: { get: () => undefined } })`)
@ysmood thank you so much.
No branches or pull requests
Could you give an example code of "PageAddScriptToEvaluateOnNewDocument"?
I want to change the value of "window.navigator.webdriver"!
The next line will cause automation to stop
page.Eval(
() => Object.defineProperties(navigator, 'webdriver', {get: () => undefined})
)The text was updated successfully, but these errors were encountered: