Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lcr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec
from webdriver_manager.chrome import ChromeDriverManager

_LOGGER = logging.getLogger(__name__)
HOST = "churchofjesuschrist.org"
Expand All @@ -31,7 +32,7 @@ class InvalidCredentialsError(Exception):
class API():
def __init__(
self, username, password, unit_number, beta=False,
driver=webdriver.Chrome(options=CHROME_OPTIONS)):
driver=webdriver.Chrome(ChromeDriverManager().install())):
self.unit_number = unit_number
self.session = requests.Session()
self.driver = driver
Expand Down Expand Up @@ -67,7 +68,7 @@ def _login(self, user, password):
# Wait until the page is loaded
WebDriverWait(self.driver, TIMEOUT).until(
ec.presence_of_element_located(
(By.CSS_SELECTOR, "input#memberLookupMain")
(By.CSS_SELECTOR, "churchofjesuschrist-eden-normalize")
)
)

Expand Down