Skip to content
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

clickEasyApplyButton appears to click whatever button is in the top right of the page #82

Open
LeenKharboutli opened this issue Mar 19, 2024 · 8 comments

Comments

@LeenKharboutli
Copy link

LeenKharboutli commented Mar 19, 2024

The log in and link scraping aspects seem to work fine. However, instead of clicking on the "Easy Apply" button, it clicks on whatever button is in the top right of your LinkedIn page. Before, it was clicking onto LinkedIn Learning, but then I disconnected LinkedIn Learning just to see if that would resolve the problem. Now it clicks on the "Try Premium" button, as it is now at the top right of the page.

I tried several things to debug, but I am not a JS developer by any means.

I attempted going through inspect element to figure out what the selector for the button ought to be, and it appeared that 'button.jobs-apply-button[aria-label^="Easy Apply"]' would do the trick.

const easyApplyButtonSelector = 'button.jobs-apply-button[aria-label^="Easy Apply"]';
await page.waitForSelector(selectors.easyApplyButtonEnabled, { timeout: 10000 });
await page.click(easyApplyButtonSelector);

The above made no difference. I consulted ChatGPT for a suggestion and tried the following:

  const easyApplyButton = await page.$(easyApplyButtonSelector);
  if (easyApplyButton) {
    await easyApplyButton.click();
  } else {
  console.error('Easy Apply button not found');
  }

Which also did not work. I'm wondering if anyone has encountered the same issue and, if so, what the solution is. Thank you!

@MoTem
Copy link

MoTem commented Mar 26, 2024

I got the exact same error. It keeps clicking the try premium button. I hope someone has a hot fix for this

@IggsGrey
Copy link

IggsGrey commented Apr 2, 2024

@MoTem @LeenKharboutli try out my fork.

I encountered this same issue and fixed it in my local version last year. I've uploaded all my changes now in my fork

@ammani
Copy link

ammani commented May 1, 2024

hello
i have this error :

[5/1/2024, 14:08:58] Logged in to LinkedIn
press enter to pause the program
TimeoutError: Waiting for selector .jobs-search-results-list li.jobs-search-results__list-item:nth-child(7) failed: Waiting failed: 5000ms exceeded
at Timeout. (C:\Users\mammani\Downloads\linkedin-easy-apply-bot-main_new\linkedin-easy-apply-bot-main\node_modules\puppeteer-core\src\common\WaitTask.ts:79:11)
at listOnTimeout (node:internal/timers:573:17)
at processTimers (node:internal/timers:514:7)

@IggsGrey
Copy link

IggsGrey commented May 1, 2024

@ammani try my fork

@ammani
Copy link

ammani commented May 1, 2024

yes im using yours . Thnks for your support. @IggsGrey

@IggsGrey
Copy link

IggsGrey commented May 1, 2024

glad it works for you @ammani . Feel free to create an issue over there instead if you ran into trouble

@ammani
Copy link

ammani commented May 1, 2024

@IggsGrey no no it didnt work :) I was saying i was using your code but still same issue

@IggsGrey
Copy link

IggsGrey commented May 1, 2024

@IggsGrey no no it didnt work :) I was saying i was using your code but still same issue

in that case you should open an issue in that repo instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants