Updated is_logged_in method to accommodate LinkedIn UI changes

This commit is contained in:
Robert Ruidisch 2024-09-02 23:45:46 +02:00
parent 165a6150f8
commit aabb6425aa

View File

@ -71,7 +71,7 @@ class LinkedInAuthenticator:
EC.presence_of_element_located((By.CLASS_NAME, 'share-box-feed-entry__trigger'))
)
buttons = self.driver.find_elements(By.CLASS_NAME, 'share-box-feed-entry__trigger')
if any(button.text.strip() == 'Start a post' for button in buttons):
if any(button.text.strip() == 'Start a post, try writing with AI' for button in buttons):
print("User is already logged in.")
return True
except TimeoutException: