Skip to content

Updated calls to selenium.webdriver.find_element_by_id#56

Open
Charl-X wants to merge 1 commit intoinAudible-NG:masterfrom
Charl-X:master
Open

Updated calls to selenium.webdriver.find_element_by_id#56
Charl-X wants to merge 1 commit intoinAudible-NG:masterfrom
Charl-X:master

Conversation

@Charl-X
Copy link

@Charl-X Charl-X commented Sep 8, 2022

Running the original audible-activator.py script with the Firefox web driver results in the error:

Traceback (most recent call last):
File "audible-activator.py", line 202, in
fetch_activation_bytes(username, password, options)
File "audible-activator.py", line 102, in fetch_activation_bytes
search_box = driver.find_element_by_id('ap_email')
AttributeError: 'WebDriver' object has no attribute 'find_element_by_id'

I updated these calls to have the intended functionality by importing By from selenium.webdriver.common.by:

search_box = driver.find_element(By.ID, 'ap_email')

…ver.find_element(By.ID, ...) to fix an error when running the Firefox web driver.
@ProfessorLogout
Copy link

Running audible-activator.py with the latest chromedriver at the time of installation through brew yields the same error and is fixed by the same fix.

$ chromedriver -v
ChromeDriver 106.0.5249.61 (511755355844955cd3e264779baf0dd38212a4d0-refs/branch-heads/5249@{#569})

Copy link

@DDvO DDvO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine - thank you for this fix!

@noisy
Copy link

noisy commented Jan 30, 2023

please merge this.

And also... please freeze dependencies version in requirements.txt to avoid such situations in the future.

@delcroip
Copy link

I was about to make the same PR ... Thanks @inAudible-NG for your work, really appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants