Answered by
amaitland
Feb 13, 2023
Replies: 1 comment
As per the error message, your selector ( Run the following in the document.querySelector('#1461173234025-3129f8602eccbe259104553afa8415434b4581-02de_1461173234023-2568f8602eccbe259104553afa8415434b458-10ad');Whilst the ID is valid, a CSS Id selector cannot start with a number. See https://stackoverflow.com/a/37271406/4583726 for more detail. You'll need to use document.getElementById instead. There is no var btnTest = await ctx.EvaluateFunctionHandleAsync<HtmlButtonElement>("document.getElementById('1461173234025-3129f8602eccbe259104553afa8415434b4581-02de_1461173234023-2568f8602eccbe259104553afa8415434b458-10ad')"); |
0 replies
Answer selected by
amaitland
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


As per the error message, your selector (
#1461173234025-3129f8602eccbe259104553afa8415434b4581-02de_1461173234023-2568f8602eccbe259104553afa8415434b458-10ad) is not valid in the context of document.querySelector.Run the following in the
DevTools Consoleand you'll get the same exception.Whilst the ID is valid, a CSS Id selector cannot start with a number. See https://stackoverflow.com/a/37271406/4583726 for more detail.
You'll need to use document.getElementById instead. There is no
APImethod for that yet as querySelecto…