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
Nothing happens on clicking a button when headless true #2959
Comments
Can you provide a repro that I can run locally? There's no way I can debug this otherwise. |
Unfortunately i can't. I can only reproduce the error accessing the web application and it's protected with password that i can't share.
Conditions like the above is working when non-headless, however it fails when headless. This #main is only showing up on headless mode (through screenshots). Apparently jquery is not working when headless. |
I get the message only when running non-headless. |
I just caught the error: "ReferenceError: chrome is not defined". |
@ziadali1 I'm not an expert, but maybe you should try to add |
@dge808 not the case :( Thank you for your help. |
I'm having a related issue (in bith headless and non-headless modes). Where I can use This worked prior to upgrading to node 8 and Puppeteer V 1.7.0 Any reason as to why ElementHandler can't find the JSHandlerobject? I tried looking at lib source to see if something was not referencing the correct array of objects but didn't find any issues. Any one else getting this issue? I've also tried the page.waitFor(3000); prior to the click event. EDIT: I updated chromium and removed executable path from Maybe upgrade chromium or reinstall new puppeteer bundle. |
@Kalevera I have the same issue. |
@jesperalmstrom are you using the chromium version that's bundled with the GitHub npm package or are you using a different chromium version and using puppeteer.launch(executablepath: path/toNON/bundled/chromium.exe)? I updated the chromium version I was using to the bundled version in recent update and that fixed the page click issue. |
@Kalevera I have had major issues getting the bundled chromium to install on my CentOS box. Now i use Puppeteer Core to skip chromium. I could work around the problem with When I look at my git log I see that I have had problem before with |
@jesperalmstrom please make sure to use proper puppeteer-core version for your chrome; the compatibility table could be found in our docs: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md @Kalevera can you share your script? It's hard to say anything without an actual script I can play with. |
@aslushnikov my issue was resolved once I updated my chromium to the latest bundled version. |
@aslushnikov happens after upgrade to 12.1. Windows, built-in version of chromium. |
I get this problem when i try to perform some click in the page. I solved this using a diferent way Before: let login_button = await page.$x('//a[contains(text(), "Login")]')
await login_button[0].click() After: await page.evaluate(() => {
let but = document.querySelector("span[class='pr-2 pr-sm-2 pr-lg-4 pl-sm-2 pl-md-2 pt-1 pb-1 nao_logado active'] > a")
if (but) {
return Promise.resolve(but.click())
}
}) I don't know why, but using "evaluate()" i can click on page buttons and links with background, minimized mode |
this helped me: await page.evaluate(()=>document.querySelector('.css-19t649w').click()) |
this happens to me too |
Hey this still works so try upgrading or installing because the chromium version works using this. Also you can change the executable to a standard chrome version if you're unable to download the chromium bundled version. |
When i execute the code with
headless: false
everything works fine. However, when setting to true, nothing happens when clicking a button.Any reason not to work? Maybe some blocking from the website? (i do not have access to the source code).
The text was updated successfully, but these errors were encountered: