Skip to content

Commit

Permalink
Fixed the linkedin update
Browse files Browse the repository at this point in the history
  • Loading branch information
RushiChaganti committed Oct 2, 2024
1 parent 9bb586f commit 4ae00e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/aihawk_easy_applier.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ def _fill_application_form(self, job):

def _next_or_submit(self):
logger.debug("Clicking 'Next' or 'Submit' button")
next_button = self.driver.find_element(By.CLASS_NAME, "artdeco-button--primary")
# Use CSS Selector to match multiple classes
next_button = self.driver.find_element(By.CSS_SELECTOR, ".artdeco-button.artdeco-button--2.artdeco-button--primary.ember-view")

button_text = next_button.text.lower()
if 'submit application' in button_text:
logger.debug("Submit button found, submitting application")
Expand All @@ -291,6 +293,7 @@ def _next_or_submit(self):
next_button.click()
time.sleep(random.uniform(1.5, 2.5))
return True

time.sleep(random.uniform(1.5, 2.5))
next_button.click()
time.sleep(random.uniform(3.0, 5.0))
Expand All @@ -305,6 +308,7 @@ def _unfollow_company(self) -> None:
except Exception as e:
logger.debug(f"Failed to unfollow company: {e}")

## Error in this function because of find_elements is accessing a CLASS_NAME ##
def _check_for_errors(self) -> None:
logger.debug("Checking for form errors")
error_elements = self.driver.find_elements(By.CLASS_NAME, 'artdeco-inline-feedback--error')
Expand Down

0 comments on commit 4ae00e3

Please sign in to comment.