-
Notifications
You must be signed in to change notification settings - Fork 93
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
No element found for selector #64
Comments
Is the page fully rendered before the error occurs or would it still be loading. I suspect a slow connection or device perhaps? A video recording would be helpful for me to better understand the issue since I can't replicate it (following the concise steps you provided) on my end |
I am also having the exact same issue. The script worked before however i am now getting this issue. My setup/device hasn't changed and i have tried this on a gigabit LAN connection so my connection speed isn't the issue |
Hi @MrJamieMcC , I encountered this issue a few days ago myself. The problem is that the page is being rendered too slow and the selector is being searched for too early, what you can do (temporarily) while we wait for @joaosilvalopes to respond is to add a delay before the selector. fetchJobLinksUser.ts:13 await new Promise((resolve) => setTimeout(resolve, 5e3)); This adds a 5 second delay right before the selector is found. |
Thank you for this quick fix <3 |
This is great input! Still, I can't make it to work.
Thanks in advance! PS. I'm not even trying to send the bot to work. I've been attempting only to use the |
@naihloan check in /fetch/fetchJobLinksUser.ts. |
@IggsGrey thanks for the quick reply! I did that modification as suggested, and the result was always the same: no element found for selector. I even applied the change in different lines, from 12 to 20, one check per time. Is there another way in which I can provide more information to reproduce the issue and perhaps be able to solve it? Is the original code working for others as is? What may I be doing wrong? |
@naihloan that looks like it might be resulting from a different missing element. You should try debugging to find which html element it is trying to find... or you could just share a screenshot of your terminal with the error message |
|
I'm now under the suspicion that this could never run as long as I have 2FA enabled. Just now, when I ran the code, I received an alert in my email that I needed to allow access. I was already signed in and enabled access again, and all the same, I wasn't able to complete the flow with |
That's weird. The only time I run into issues with 2fa is when I try to run it in headless mode. Do you get a chrome window popup when you |
I see the window popup, but it's chromium |
shouldn't be a problem. In this case it looks like you have 2fa enabled all the time.. I'm not familiar with linkedin's 2fa settings so this is just a guess. Also it's possible your IP is not trusted, perhaps you're connected to a VPN or using a public WIFI network. But yeah... the case here is the 2fa that is being triggered. Perhaps in the future it should be possible to pause the script to allow you to complete 2fa. |
for anyone else in the future who encounters this issue, here's a fork I'm maintaining |
Issue Description
Error: No element found for selector:
input[id*="jobs-search-box-keyword-id"]
Problem
When running the
npm run start
command, the script encounters an error while interacting with the LinkedIn website. It fails to find an input element with the selectorinput[id*="jobs-search-box-keyword-id"]
.Steps to Reproduce
npm run start
.Expected Behavior
The script should be able to locate the input element with the selector
input[id*="jobs-search-box-keyword-id"]
on the LinkedIn page.Actual Behavior
The script throws an error indicating that it cannot find the specified input element.
Requested Help
I'm seeking assistance in resolving this issue. Can someone help me understand why the script is unable to find the expected input element and provide guidance on how to fix it?
Please let me know if any additional information is required.
The text was updated successfully, but these errors were encountered: