-1

Code trials:

from selenium import webdriver
from selenium.webdriver.chrome.options import Options as Chromeoptions

chrome_options = Chromeoptions()
chrome_options.add_extension('Metamask.crx')

driver = webdriver.chrome("./chromedriver", options=chrome_options)
driver.get("Https://www.youtube.com")

driver.quit()

This is the code I made, but I get this error:

TypeError: 'module' object is not callable.

Can someone help me to solve the problem?

1
  • You are calling webdriver.chrome(..., which is a module (as evident from from selenium.webdriver.*chrome*.options import ...) Commented Nov 13, 2021 at 15:40

1 Answer 1

-2

chrome is a module. Instead of that you need to call Chrome() as webdriver.Chrome()

Your effective line of code will be:

driver = webdriver.Chrome("./chromedriver", options=chrome_options)

References

You can find a couple of relevant detailed discussions in:

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.