Examples of Coordinates


Examples of org.openqa.selenium.interactions.internal.Coordinates

        mouse.mouseMove(buttonCoordinates, buttonDimensions.getWidth() - 1,
                buttonDimensions.getHeight() - 1);
    }

    private void moveMouseToButtonUpperLeftCorner(Mouse mouse) {
        Coordinates buttonCoordinates = getButtonCoordinates();

        mouse.mouseMove(buttonCoordinates, 0, 0);
    }
View Full Code Here

Examples of org.openqa.selenium.interactions.internal.Coordinates

                By.className("v-captiontext"));

        assertEquals("inner layout", caption.getText());

        // Hover over the caption
        Coordinates coords = ((Locatable) caption).getCoordinates();
        ((HasInputDevices) getDriver()).getMouse().mouseMove(coords);
        sleep(1000);

        String selector = "Root/VNotification[0]";
        try {
View Full Code Here

Examples of org.openqa.selenium.interactions.internal.Coordinates

        assertThat(errorMessage.isDisplayed(), is(false));

    }

    private void showTooltip(int index) {
        Coordinates elementCoordinates = ((Locatable) getTab(index))
                .getCoordinates();
        Mouse mouse = ((HasInputDevices) getDriver()).getMouse();
        mouse.mouseMove(elementCoordinates);
    }
View Full Code Here

Examples of org.openqa.selenium.interactions.internal.Coordinates

        tooltipText = driver.findElement(By.className("v-tooltip")).getText();
        assertEquals(tooltipText, "Horizontal layout tooltip");
    }

    private void showTooltip(WebElement element) {
        Coordinates elementCoordinates = ((Locatable) element).getCoordinates();
        Mouse mouse = ((HasInputDevices) getDriver()).getMouse();
        mouse.mouseMove(elementCoordinates);
    }
View Full Code Here

Examples of org.openqa.selenium.interactions.internal.Coordinates

    @Test
    public void testTooltipLocation() {
        openTestURL();
        Mouse mouse = ((HasInputDevices) getDriver()).getMouse();
        WebElement menu = $(MenuBarElement.class).first().getWrappedElement();
        Coordinates menuLocation = ((Locatable) menu).getCoordinates();
        mouse.click(menuLocation);
        mouse.mouseMove(menuLocation, 5, -40);
        WebElement tooltip = getTooltipElement();
        assertThat(tooltip.getLocation().x, is(lessThan(menuLocation.onPage().x
                - tooltip.getSize().getWidth())));

    }
View Full Code Here

Examples of org.openqa.selenium.interactions.internal.Coordinates

    @Test
    public void testToolTipDelay() throws InterruptedException {
        openTestURL();

        Coordinates elementCoordinates = getCoordinates($(MenuBarElement.class)
                .first());

        Mouse mouse = ((HasInputDevices) getDriver()).getMouse();

        mouse.click(elementCoordinates);
        mouse.mouseMove(elementCoordinates, 15, 40);

        sleep(1000);

        assertThat(getTooltipElement().getLocation().getX(),
                is(lessThan(-1000)));

        sleep(3000);

        assertThat(getTooltipElement().getLocation().getX(),
                is(greaterThan(elementCoordinates.onPage().getX())));
        assertThat(getTooltipElement().getText(), is("TOOLTIP 1"));
    }
View Full Code Here

Examples of weka.classifiers.misc.monotone.Coordinates

    // cycle through all instances
    Iterator it = new EnumerationIterator(m_train.enumerateInstances());
    while (it.hasNext() == true) {
      Instance instance = (Instance) it.next();
      Coordinates c = new Coordinates(instance);

      // get DiscreteEstimator from the map
      DiscreteEstimator df =
  (DiscreteEstimator) m_estimatedDistributions.get(c);

      // if no DiscreteEstimator is present in the map, create one
      if (df == null) {
  df = new DiscreteEstimator(instances.numClasses(), 0);
      }
      df.addValue(instance.classValue(), instance.weight()); // update
      m_estimatedDistributions.put(c, df); // put back in map
    }

    // Create the attributes for m_baseMin and m_baseMax.
    // These are identical to those of m_train, except that the
    // class is set to 'numeric'
    // The class attribute is moved to the back
    FastVector newAtts = new FastVector(m_train.numAttributes());
    Attribute classAttribute = null;
    for (int i = 0; i < m_train.numAttributes(); i++) {
      Attribute att = m_train.attribute(i);
      if (i != m_train.classIndex()) {
  newAtts.addElement(att.copy());
      } else {
  classAttribute = new Attribute(att.name()); //numeric attribute
      }
    }
    newAtts.addElement(classAttribute);

    // original training instances are replaced by an empty set
    // of instances
    m_train = new Instances(m_train.relationName(), newAtts,
  m_estimatedDistributions.size());
    m_train.setClassIndex(m_train.numAttributes() - 1);


    // We cycle through the map of estimatedDistributions and
    // create one Instance for each entry in the map, with
    // a class value that is calculated from the distribution of
    // the class values
    it = m_estimatedDistributions.keySet().iterator();
    while(it.hasNext()) {
      // XXX attValues must be here, otherwise things go wrong
      double[] attValues = new double[m_train.numAttributes()];
      Coordinates cc = (Coordinates) it.next();
      DiscreteEstimator df =
  (DiscreteEstimator) m_estimatedDistributions.get(cc);
      cc.getValues(attValues);
      switch(m_atype) {
  case AT_MEAN:
    attValues[attValues.length - 1] = (new DiscreteDistribution(df)).mean();
    break;
  case AT_MEDIAN:
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.