question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not clicking hyperlink with long text

See original GitHub issue

When i try to click an hyperlink with a long text nothing happens.

await page.waitForSelector('#ct01');
await page.click('#ct01'); 

Working: <td><a id="ct01" href="javascript:window.open(URL,'RecoverPassword','width=700,height=450');">TEST</a></td>

Not Working: <td><a id="ct01" href="javascript:window.open(URL,'RecoverPassword','width=700,height=450');">TTT - TTTTTTTTTT TTT TTTTTTTTT T TTTTTTTTTTTT TTTTTTTTTTT TTTTT</a></td>

  • Puppeteer version: puppeteer@1.4.0
  • Platform / OS version: Windows 7
  • Node.js version: 9.10.1

Anybody knows why? And a possible solution to this?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
aslushnikovcommented, Jul 7, 2018

@ziadali1 this is fixed on tip-of-tree puppeteer; try installing puppeteer@next and using page.click with this long link.

Closing as dupe of #2798.

1reaction
vsemozhetbytcommented, Jul 6, 2018

I can think of two ways, with an additional argument or with a template string:

    let selector = 'a';
    page.evaluate((selector) => document.querySelector(selector).click(), selector);

or

    let selector = 'a';
    page.evaluate(`document.querySelector('${selector}').click()`);

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common Hyperlink Problems - Suzanne S. Barnhill - Home
Hyperlinks aren't clickable · It isn't really a hyperlink. It may just be plain text with the Hyperlink character style applied. · You...
Read more >
Customize the text for a hyperlink - Microsoft Support
Right-click anywhere on the link and, on the shortcut menu, click Edit Hyperlink. selecting 'Edit Hyperlink' from the shortcut menu · In the...
Read more >
Links not clickable in iMessage app | Apple Developer Forums
Hi Team,. We are facing an issue with iMessage app on iOS versions greater than 10.2. Sometimes, URL links in received messages are...
Read more >
Hyperlink Not Working In Word: How To Fix It In All Versions ...
Select the text you want to show as a hyperlink and right-click on it. You can also press CTRL+K. Type or paste the...
Read more >
Able to click on a button/hyperlink only at the upper half of the ...
Please provide us a link or URL where we can check this issue, its seems that you are enable to click the the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found