title: Access denied to website using webdriver with Selenium
body: <p>I have a problem with even an open website using &quot;webdriver Chrome&quot;. Only trying to open the website end with &quot;Access denied&quot; information and don't know why.
  Below is my code:</p>
  <pre><code>from selenium import webdriver
  from selenium.common.exceptions import TimeoutException
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.support import expected_conditions as ec
  from selenium.webdriver.common.by import By
  from selenium.webdriver.chrome.options import Options
  
  import time
  
  class PriceCheckPhoenix:
      def __init__(self):
          self.url_login = &quot;https://www.phoenixcontact.com/online/portal/pl?1dmy&amp;urile=wcm%3apath%3a/plpl/web/home&quot;
  
          self.create_session()
  
      def create_session(self):
      # Run browser with webdriver
  
          driver = webdriver.Chrome(executable_path=&quot;D:/chromedriver_v84.exe&quot;)
          driver.get(self.url_login)
  
          time.sleep(2)
  
          # Find link to sub-website with login
          link = driver.find_element_by_xpath('//*[@id=&quot;pxc-funcnav&quot;]/div[3]/ul/li[1]/a').get_attribute(&quot;href&quot;)
      
          driver.get(link)
  
          time.sleep(100)
  </code></pre>
  <p>Description to code:</p>
  <p>#1 I create browser chrome session</p>
  <p>#2 Loading first website from self.url_login</p>
  <p>#3 Is loaded</p>
  <p>#4 I need to find a link behind the active text on the website to log in</p>
  <p>#5 I found it and try to open this, but the response after getting a link is:</p>
  <pre><code>Access Denied
  You don't have permission to access 
  &quot;http://www.phoenixcontact.com/online/portal/pl/pxc/offcontext/login/!ut/p/z1/tZJNa4NAEIZ_Sw45yszuuro9WkO1xqY2EqN7EbXGWPzYFDGlv74Gcio0oYTMZRgY3mcYHpAQg-yysa6yoe67rJnmRBqpu4zownzixDEYx2cWmIYTeYgrHSKQIFVRv0MieJZTZEITglFNLwTXRPaw03RGC6Qm10nOTttFN6hhD4lqVDPHY5nPcd-3JSQTy0ypQ5C4Onl5XUcmvgXCttzNWo-WCNuxLo-w6frPdjot_CfZxWsEciPhSjy7a7xN7xt_63M8kJdNmlSrPw4HaU2G9N1Qfg0Q_1Zke4JeiPHIeQH_KAshVE0a-GkQ24EPqm0F41WbLh5XWuKN3-fm78KgsmazH7dw0Ts!/dz/d5/L0lJSklKQ2dwUkEhIS9JRGpBQUF4QUFFUkNwcVlxLzRObEdRb1lwTWhUalVFZyEvWjZfR0FMNjE0ODI4RzNEQzBJMklPMlA2OTFHMDMvWjdfR0FMNjE0ODI4RzNEQzBJMklPMlA2OTFHSTcvdGFyZ2V0Vmlldy9sb2dpbg!!/&quot; on this server.
  Reference #18.d58655f.1597921471.5b29112
  </code></pre>
  <p>Is anyone know what is wrong here? :( When I try to load the website from the link in normal Chrome browser it's all fine :/
  Thank you all for any help.</p>