title: Selenium cannot enable javascript in python
body: <p>how do I enable javascript in selenium using python? I tried several methods but mine isnt working. Does anyone know how could i fix this issue? Thanks</p>
  
  <p>My code</p>
  
  <pre><code>from selenium import webdriver
  import urllib
  import urllib.request
  import string
  from bs4 import BeautifulSoup
  import mysql.connector
  import time
  
  chrome_path = r"C:\chromedriver.exe"
  driver = webdriver.Chrome(chrome_path)
  driver.add_argument("--enable-javascript")
  </code></pre>
  
  <p>Error i got </p>
  
  <pre><code>Exception has occurred: AttributeError
  'WebDriver' object has no attribute 'add_argument'
    File "C:\Users\bustillo-ronald\Desktop\python-basics\Scrape\propertyguru.py", line 11, in &lt;module&gt;
      driver.add_argument("--enable-javascript")
  </code></pre>