Answer the question
In order to leave comments, you need to log in
How to solve "'str' object is not callable" error?
I made a bot for a site that first of all should log into the account by clicking on the button, but when I wrote down what I want and ran the code, I got an error: 'str' object is not callable
I want the button to be clicked
Here is my code:
from selenium import webdriver
import time
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
url = "https://omlet.gg/stream/iromanenkov"
# Указываем абсолютный путь до хромдрайвера
driver = webdriver.Chrome(executable_path=r"C:\Users\namva\PycharmProjects\seleniumlessons\chromedriver\chromedriver.exe")
try:
driver.get("https://omlet.gg/stream/iromanenkov")
time.sleep(5)
# Логин
login = driver.find_element(By.CLASS_NAME(" omlet-bar-login-button")).click()
time.sleep(5)
except Exception as ex:
print(ex)
finally:
driver.close()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question