title: selenium chromedriver php detected as a bot
body: <p>Just wondering if anyone can porvide any insight to a problem that I am having. I am trying to scrape a site using selenium and chromedriver. The site seems to always detect the chromedriver browswer as a bot. here is my configuration, how can I avoid this detection?</p>
  
  <p>Selenium build info</p>
  
  <p>Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
  System info: host: 'localhost', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-108-generic', java.version: '1.8.0_151'</p>
  
  <p>I am using ChromeDriver 2.33.506092. Any help is appreciated </p>
  
  <pre><code>&lt;?php
      // An example of using php-webdriver.
      namespace Facebook\WebDriver;
      use Facebook\WebDriver\Chrome\ChromeOptions;
      use Facebook\WebDriver\Remote\DesiredCapabilities;
      use Facebook\WebDriver\Remote\RemoteWebDriver;
      require_once dirname(__FILE__) .'/vendor/autoload.php';
  
  $userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36';
  
  
  $host = 'http://localhost:4321/wd/hub';
  $url = $host;
  $options = new ChromeOptions();
  // Setting the binary is optional.
  //$options-&gt;setBinary('/bin/chromedriver');
  
  // Available options:
  // http://peter.sh/experiments/chromium-command-line-switches/
  $options-&gt;addArguments(array(
      //'--window-size=571,428',
    // '--start-maximized',
  //  '--headless',
      "--disable-gpu", "--window-size=1920,1080", "--no-sandbox",
      '--user-agent=' . $userAgent,
      "disable-infobars"
  
  ));
  
  
  
  // Setting extensions is also optional
  //$options-&gt;addExtensions(array(
  //    '/path/to/chrome/extension1.crx',
  //    '/path/to/chrome/extension2.crx',
  //));
  
  $caps = DesiredCapabilities::chrome();
  $caps-&gt;setPlatform('WINDOWS');
  $caps-&gt;setCapability(ChromeOptions::CAPABILITY, $options);
  
  $driver = RemoteWebDriver::create($url, $caps,5000);
  
  
  
  $driver-&gt;manage()-&gt;deleteAllCookies();
  $url2 = 'https://www.realtor.ca/Residential/Map.aspx#CultureId=1&amp;ApplicationId=1&amp;RecordsPerPage=9&amp;MaximumResults=9&amp;PropertySearchTypeId=1&amp;TransactionTypeId=2&amp;StoreyRange=0-0&amp;BedRange=0-0&amp;BathRange=0-0&amp;LongitudeMin=-156.0498046875&amp;LongitudeMax=-16.9189453125&amp;LatitudeMin=34.88592973581311&amp;LatitudeMax=72.71190267150946&amp;SortOrder=A&amp;SortBy=1&amp;viewState=m&amp;ZoomLevel=4&amp;PropertyTypeGroupID=1';
  
  $driver-&gt;get($url2);
  sleep(20)  ;
  $cookies = $driver-&gt;manage()-&gt;getCookies();
  </code></pre>