Package org.openqa.selenium.chrome

Examples of org.openqa.selenium.chrome.ChromeDriver


            throw new UnsupportedOperationException(e);
        }
    }

    protected ChromeDriver createChromeDriver() {
        return new ChromeDriver();
    }
View Full Code Here


          if ("HtmlUnit".equals(driverType)) {
            boolean enableJavaScript = pc.get("ju-testing-ee.selenium.htmlUnit.enableJavascript", Boolean.class);
            driver = new HtmlUnitDriver(enableJavaScript);
          } else if ("Chrome".equals(driverType)) {
            System.setProperty("webdriver.chrome.driver", DriverRule.getChromeDriverExePath().toAbsolutePath().toString());
                driver = new ChromeDriver();
          } else {
            throw new JuRuntimeException(String.format("Unsupported selenium driver type: %s. Check value of property %s"
                , driverType
                , PROP_DRIVER));
          }
View Full Code Here

    System.setProperty("webdriver.chrome.driver",
        "C:\\Titanium\\Titanium1\\lib\\chromedriver.exe");
   

    WebDriver driver = new ChromeDriver();

    // Google ����Ʈ �湮
    //driver.get(url);

    // ������ ����
View Full Code Here

            filterAttributes, crawlWaitEvent, crawlWaitReload);
  }

  private EmbeddedBrowser newChromeBrowser(ImmutableSortedSet<String> filterAttributes,
          long crawlWaitReload, long crawlWaitEvent) {
    ChromeDriver driverChrome;

    if (configuration.getProxyConfiguration() != null
            && configuration.getProxyConfiguration().getType() != ProxyType.NOTHING) {
      ChromeOptions optionsChrome = new ChromeOptions();
      optionsChrome.addArguments("--proxy-server=http://"
              + configuration.getProxyConfiguration().getHostname() + ":"
              + configuration.getProxyConfiguration().getPort());
      driverChrome = new ChromeDriver(optionsChrome);
    } else {
      driverChrome = new ChromeDriver();
    }

    return WebDriverBackedEmbeddedBrowser.withDriver(driverChrome, filterAttributes,
            crawlWaitEvent, crawlWaitReload);
  }
View Full Code Here

        if ("HtmlUnit".equals(driverType)) {
          boolean enableJavaScript = pc.get("ju-testing-ee.selenium.htmlUnit.enableJavascript", Boolean.class);
          driver = new HtmlUnitDriver(enableJavaScript);
        } else if ("Chrome".equals(driverType)) {
          System.setProperty("webdriver.chrome.driver", DriverRule.getChromeDriverExePath().toAbsolutePath().toString());
              driver = new ChromeDriver();
        } else {
          throw new JuRuntimeException(String.format("Unsupported selenium driver type: %s. Check value of property %s"
              , driverType
              , PROP_DRIVER));
        }
View Full Code Here

 
  public void run() {
   
    init();
   
    WebDriver driver = new ChromeDriver();
   
   
    login(driver);
   
    TableParser t = null;
   
    try {
      Thread.sleep(5000);
    } catch (InterruptedException e1) {
      // TODO Auto-generated catch block
      e1.printStackTrace();
    }
   
    while (true) {
     
      try {
       
        //for (TraderInfo ti : traderList) {
                 
          //driver.get(ti.getUrl());
               
                driver.findElement(By.linkText("������")).click();

                Thread.sleep(5000);
               
          String s =  driver.findElement(By.id("table-body-positions")).getText();
         
                System.out.println(s);
               
          t = new TableParser(s);
         
          t.parse();
               
               
        //}
       

        SignalCreator sc = new SignalCreator(t.getZuluData());
        sc.createFile(path + "SIGNAL.CSV");
       
        driver.navigate().refresh();
        Thread.sleep(60000);
       
      } catch (InterruptedException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
View Full Code Here

    Runtime.getRuntime().addShutdownHook(new WebdriversFinalCleanupThread(currentThread()));
    return webDriver;
  }

  protected WebDriver createChromeDriver() {
    return new ChromeDriver();
  }
View Full Code Here

  private static WebDriver createDriver(String browser) {
    if ("chrome".equalsIgnoreCase(browser)) {
      ChromeOptions options = new ChromeOptions();
      options.addArguments("chrome.switches", "--start-maximized");
      return new ChromeDriver(options);
    }
    else if ("ie".equalsIgnoreCase(browser)) {
      DesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer();
      ieCapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
      return new InternetExplorerDriver(ieCapabilities);
View Full Code Here

    DesiredCapabilities capabilities = DesiredCapabilities.chrome();
    capabilities.setCapability(ChromeOptions.CAPABILITY, options);

    System.out.println("Starting an instance of chrome.");
    driver = new ChromeDriver(capabilities);

    // TODO figure out how to pre-install extensions automatically (see commented out code above for things that don't work)
    driver.get("chrome://extensions/");
    System.out.println("\nWaiting " + getTimeoutExtension()/1000 + " seconds for you to install Extensions manually.");
    System.out.println("Check the Developer mode checkbox and then use the Load unpackaged extensions to load the mooltipass authentication_clients chrome.hid-app and chrome.ext\n");
View Full Code Here

            crawlWaitEvent, crawlWaitReload);
  }

  private EmbeddedBrowser newChromeBrowser(ImmutableSortedSet<String> filterAttributes,
          long crawlWaitReload, long crawlWaitEvent) {
    ChromeDriver driverChrome;
    if (configuration.getProxyConfiguration() != null
            && configuration.getProxyConfiguration().getType() != ProxyType.NOTHING) {
      ChromeOptions optionsChrome = new ChromeOptions();
      String lang = configuration.getBrowserConfig().getLangOrNull();
      if (!Strings.isNullOrEmpty(lang)) {
        optionsChrome.addArguments("--lang=" + lang);
      }
      optionsChrome.addArguments("--proxy-server=http://"
              + configuration.getProxyConfiguration().getHostname() + ":"
              + configuration.getProxyConfiguration().getPort());
      driverChrome = new ChromeDriver(optionsChrome);
    } else {
      driverChrome = new ChromeDriver();
    }

    return WebDriverBackedEmbeddedBrowser.withDriver(driverChrome, filterAttributes,
            crawlWaitEvent, crawlWaitReload);
  }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.chrome.ChromeDriver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.