nicolomantini / LinkedIn-Easy-Apply-Bot

Automate the application process on LinkedIn
Apache License 2.0
840 stars 335 forks source link

LinkedIn EasyApply Bot Fails to Fill Input Fields and Radio Buttons During Job Application Process #167

Closed tahawar closed 1 month ago

tahawar commented 6 months ago

Description: Issue: When utilizing the LinkedIn EasyApply feature to apply for a job, the automated bot fails to populate the required input fields and select radio buttons, resulting in incomplete job applications.

Details: During the job application process on LinkedIn using the EasyApply feature, the automated bot encounters difficulty in filling out the necessary input fields and selecting radio buttons. This leads to incomplete submissions and potentially affects the user's ability to successfully apply for the desired position.

Steps to Reproduce:

Navigate to a job listing on LinkedIn. Click on the "EasyApply" button to initiate the application process. Observe the bot's attempt to fill out the application form. Note the failure of the bot to populate certain input fields and radio buttons. Expected Behavior: The LinkedIn EasyApply bot should accurately populate all required input fields and select radio buttons during the job application process, ensuring a seamless user experience and successful submission of applications.

Attachments: Screenshots demonstrating the issue encountered during the job application process will be provided for reference and further investigation.

image

R-Yash commented 6 months ago

@tahawar Were you able to resolve this issue? I am facing the same problem. I get this error ERROR - Message: invalid argument: 'using' must be a string selenium

azjz92 commented 4 months ago

it seems like it wants to skip an app when it doesnt know here is an example in my terminal "yes no with answer: Yes 13:17:59 - ERROR - 'WebElement' object has no attribute 'execute_script' 13:17:59 - INFO - Answering question: will you now or in the future require sponsorship for employment visa status? will you now or in the future require sponsorship for employment visa status? required yes no please make a selection with answer: No 13:17:59 - ERROR - 'WebElement' object has no attribute 'execute_script' 13:18:00 - INFO - Skipping application 13:18:01 - INFO - Please answer the questions, waiting 5 seconds..."

and then gets stuck, you can fill out the field to let it continue but I'm going to see if I can implement a workaround. Lets figure it out!

R-Yash commented 4 months ago

Hi @azjz92 I was able to make it work by making some changes in the process_questions() function I don't exactly remember what all changes I made, but this is the implementation that finally worked for me. Try it and see if this works for you.

def process_questions(self):
        time.sleep(3)
        form = self.browser.find_elements(By.XPATH, "//div[contains(@class,'jobs-easy-apply-form-section__grouping')]")
        for field in form:
            question = field.text.lower()
            answer = self.ans_question(question)

            try:
                # Check for radio buttons
                radio_buttons = field.find_elements(By.XPATH, ".//input[@type='radio']")
                if radio_buttons:
                    for radio in radio_buttons:
                        if radio.get_attribute('value').lower() == answer.lower():
                            self.browser.execute_script("arguments[0].click();", radio)
                            break

                # Check for multi-select dropdowns
                dropdowns = field.find_elements(By.XPATH, ".//*[contains(@id, 'text-entity-list-form-component')]")
                if dropdowns:
                    for dropdown in dropdowns:
                        for option in dropdown.find_elements(By.TAG_NAME, "option"):
                            if option.text.lower() == answer.lower():
                                option.click()
                                break

                # Check for text inputs or textareas
                text_inputs = field.find_elements(By.CSS_SELECTOR, "input[type='text'], textarea")
                if text_inputs:
                    for text_input in text_inputs:
                        text_input.clear()
                        text_input.send_keys(answer)
            except Exception as e:
                pass
azjz92 commented 4 months ago

Hey friend, thank you! It's a definite improvement. It seems to be much more robust but I'm doing furthur testing. It looks like some really niche questions like "please answer yes if you are a developer" (yes) or (no) . If there are really niche questions I'm going to look into how to just make the best guess.

TechWithTy commented 3 months ago

Thank you for raising this issue. The dynamic nature of the questions presented during the LinkedIn EasyApply process indeed presents a significant challenge for automation.

Current Challenge The questions and input fields during the job application process can vary widely, making it difficult for a static script to handle all possible scenarios. This variability can lead to incomplete applications as the bot struggles to identify and interact with different form elements accurately.

Planned Improvements We are currently working on implementing machine learning (ML) logic to address this issue. Our goal is to enhance the bot's ability to understand and respond to these dynamic questions based on the user profile. This approach aims to make the bot more adaptive and capable of handling a broader range of questions and input fields, improving the overall success rate of job applications. I think each question should also have a nested specific selector

azjz92 commented 3 months ago

That sounds fantastic, I was also just collecting all the instances of where the bot fails with dynamic questions and manually adding those in my for loops in the code... I'll see how robust I can make it and send a pull request if all goes well. But let me know if you want any additional help or testing/debugging for the ML stuff. Would love to help.

On Wed, Aug 7, 2024 at 8:41 PM TechWIthTy @.***> wrote:

Thank you for raising this issue. The dynamic nature of the questions presented during the LinkedIn EasyApply process indeed presents a significant challenge for automation.

Current Challenge The questions and input fields during the job application process can vary widely, making it difficult for a static script to handle all possible scenarios. This variability can lead to incomplete applications as the bot struggles to identify and interact with different form elements accurately.

Planned Improvements We are currently working on implementing machine learning (ML) logic to address this issue. Our goal is to enhance the bot's ability to understand and respond to these dynamic questions based on the user profile. This approach aims to make the bot more adaptive and capable of handling a broader range of questions and input fields, improving the overall success rate of job applications. I think each question should also have a nested specific selector

— Reply to this email directly, view it on GitHub https://github.com/nicolomantini/LinkedIn-Easy-Apply-Bot/issues/167#issuecomment-2274634646, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANWK5AKAOGVUZVWOYTBZJFTZQK5EHAVCNFSM6AAAAABHTWEQVOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZUGYZTINRUGY . You are receiving this because you were mentioned.Message ID: @.***>

TechWithTy commented 3 months ago

Right now im working more on dice as they have way less questions and i have had better luck with them, its fully working just need to start implementing AI , would love your help if youre willing, we would then port the same logic over to linked in.

Also just having a dictionary of possible selectors of the answers should be enough

azjz92 commented 3 months ago

Would love to help! Is Dice worth it? Yeah fill me in it would be rewarding! Hit me up.

On Sat, Aug 10, 2024 at 2:52 PM TechWIthTy @.***> wrote:

Right now im working more on dice as they have way less questions and i have had better luck with them, its fully working just need to start implementing AI , would love your help if youre willing, we would then port the same logic over to linked in.

— Reply to this email directly, view it on GitHub https://github.com/nicolomantini/LinkedIn-Easy-Apply-Bot/issues/167#issuecomment-2282244656, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANWK5AMEALQ3PWVPZZ6HCHDZQZOQLAVCNFSM6AAAAABHTWEQVOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBSGI2DINRVGY . You are receiving this because you were mentioned.Message ID: @.***>

github-actions[bot] commented 1 month ago

Stale issue message