title: Selenium - org.openqa.selenium.chrome.ChromeDriver cannot be cast to com.thoughtworks.selenium.Selenium
body: <p>I'm using <a href="https://code.google.com/p/flex-ui-selenium/" rel="nofollow">flex-ui-selenium</a> to automate my flex application, which adds 2 numbers and displays the result in an alert box.</p>
  
  <p>Below is my selenium code:</p>
  
  <pre><code>package com.selenium.testcases;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.chrome.ChromeDriver;
  import com.thoughtworks.selenium.FlexUISelenium;
  import com.thoughtworks.selenium.Selenium;
  
  public class FlashSeleniumtest {
          @SuppressWarnings("deprecation")
          public static void main(String[] args) throws Exception {
              System.setProperty("webdriver.chrome.driver", "C:\\dev\\HydFramework\\Hyd\\HybridFrameWork\\jarsForAnt\\chromedriver.exe");
              String BASE_URL = "C:\\Program Files\\Apache Software Foundation\\Tomcat 7.0\\webapps\\FlexDemo\\SeleniumTest-debug\\SeleniumTest.html";
              WebDriver driver = new ChromeDriver();
              //FlashObjectWebDriver driver1  = new FlashObjectWebDriver((FlashObjectWebDriver) driver,"SeleniumTest");
              driver.get(BASE_URL);
              driver.manage().window().maximize();
              FlexUISelenium flexUITester;
              flexUITester = new FlexUISelenium((Selenium) driver, "SeleniumTest");
              flexUITester.type("100").at("first");
              flexUITester.type("200").at("second");
              flexUITester.click("Sum");
          }
          }
  </code></pre>
  
  <p>When I execute this code, I get the following exception:</p>
  
  <p>"org.openqa.selenium.chrome.ChromeDriver cannot be cast to com.thoughtworks.selenium.Selenium". 
  Please help.</p>