CARTAvis / carta-python

CARTA scripting wrapper written in Python
GNU General Public License v3.0
0 stars 0 forks source link

find_element_by_* are removed starting Selenium 4.3.0 #144

Closed kswang1029 closed 8 months ago

kswang1029 commented 9 months ago

Due to this removed method, the carta python wrapper cannot be run if users are with Selenium 4.3.0+ installed.

The affected codebase is "browser.py" in line90 (https://github.com/CARTAvis/carta-python/blob/c7e7c6c221cc4fc3aa3e4f8b5253ef95fe3ee064/carta/browser.py#L90C17-L90C113):

session_id = int(self.driver.find_element_by_id("info-session-id").get_attribute("textContent"))

A solution could be adding from selenium.webdriver.common.by import By in "browser.py" and change line90 to

session_id = int(self.driver.find_element(By.ID, "info-session-id").get_attribute("textContent"))