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.

QuerySelectorAllAsync div a

See original GitHub issue

jquery: on webpage

$("div.show-auto-save a")[0]

We can get the result:

<a data-v-fc117650 href=​"javascript:​void(0)​">Cancel​</a>​

If I use puppetersharp:

var input3 = await firstPage.QuerySelectorAllAsync("div.show-auto-save a");

Cannot get this a object.

help me,thank you

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Meir017commented, Mar 15, 2020

@whgfu what happens? does the method return an empty array?

0reactions
whgfucommented, Mar 15, 2020

Yes, I have. This is my code

var js = “$("div.show-auto-save").css("display", "")”; await firstPage.EvaluateFunctionAsync($“() => {js}”); var input4 = await firstPage.QuerySelectorAllAsync(“div.show-auto-save a”); await input4[0].ClickAsync();

Read more comments on GitHub >

github_iconTop Results From Across the Web

Async querySelector access - javascript
async functions are tools to allow you to manage promises via the await keyword. querySelector does not return a promise, so await ing...
Read more >
An async querySelector equivalent
An async querySelector equivalent. ... const asyncQuerySelector = async (node, query) => { ... return node; // <div id="app>...</div>.
Read more >
Document: querySelector() method - Web APIs | MDN
The Document method querySelector() returns the first Element within the document that matches the specified selector, or group of selectors ...
Read more >
How to use Promises or Async / Await with this example
I have some code like so: HTML <button class="selector">CLICK ME</button> JS var ... querySelector('.selector'); function f1() { selector.
Read more >
Query Selectors
Query Selectors · import puppeteer from 'puppeteer'; · (async () => { · // Launch the browser · const browser = await puppeteer.launch();...
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