Package org.openqa.selenium.interactions

Examples of org.openqa.selenium.interactions.Actions.sendKeys()


       List<WebElement>elements = driver_.findElements(By.id(
             ElementIds.getElementId(ElementIds.POPUP_COMPLETIONS)));
       assertEquals(elements.size(), 0);

       Actions popup = new Actions(driver_);
       popup.sendKeys(Keys.ESCAPE);
       popup.sendKeys("print");
       popup.sendKeys(Keys.TAB);
       popup.perform();
      
       (new WebDriverWait(driver_, 5)).until(new ExpectedCondition<Boolean>() {
View Full Code Here


             ElementIds.getElementId(ElementIds.POPUP_COMPLETIONS)));
       assertEquals(elements.size(), 0);

       Actions popup = new Actions(driver_);
       popup.sendKeys(Keys.ESCAPE);
       popup.sendKeys("print");
       popup.sendKeys(Keys.TAB);
       popup.perform();
      
       (new WebDriverWait(driver_, 5)).until(new ExpectedCondition<Boolean>() {
          public Boolean apply(WebDriver d) {
View Full Code Here

       assertEquals(elements.size(), 0);

       Actions popup = new Actions(driver_);
       popup.sendKeys(Keys.ESCAPE);
       popup.sendKeys("print");
       popup.sendKeys(Keys.TAB);
       popup.perform();
      
       (new WebDriverWait(driver_, 5)).until(new ExpectedCondition<Boolean>() {
          public Boolean apply(WebDriver d) {
             List<WebElement>elements = driver_.findElements(By.id(
View Full Code Here

          }
       });

       // Test cancelling autocomplete once invoked
       Actions close = new Actions(driver_);
       close.sendKeys(Keys.ESCAPE).perform();

       (new WebDriverWait(driver_, 5)).until(new ExpectedCondition<Boolean>() {
          public Boolean apply(WebDriver d) {
             List<WebElement>elements = driver_.findElements(By.id(
                   ElementIds.getElementId(ElementIds.POPUP_COMPLETIONS)));
View Full Code Here

   @Test
   public void testPlotGeneration() {
      ConsoleTestUtils.resumeConsoleInteraction(driver_);

      Actions plotCars = new Actions(driver_);
      plotCars.sendKeys(Keys.ESCAPE + "plot(cars)" + Keys.ENTER);
      plotCars.perform();
     
      // Wait for the Plot window to activate
      final WebElement plotWindow = (new WebDriverWait(driver_, 5))
        .until(ExpectedConditions.presenceOfElementLocated(
View Full Code Here

   @Test
   public void testInvokeHelp() {
      ConsoleTestUtils.resumeConsoleInteraction(driver_);
      Actions help = new Actions(driver_);
      help.sendKeys(Keys.ESCAPE + "?lapply" + Keys.ENTER);
      help.perform();

      // Wait for the Help window to activate
      final WebElement helpWindow = (new WebDriverWait(driver_, 5))
        .until(ExpectedConditions.presenceOfElementLocated(
View Full Code Here

    
      DialogTestUtils.waitForFocusedInput(driver_, importFileDialog);
      Actions typeName = new Actions(driver_);
      File csvFile = new File("test/org/rstudio/studio/selenium/resources/banklist.csv");
      typeName.sendKeys(csvFile.getAbsolutePath());
      typeName.perform();
      DialogTestUtils.respondToModalDialog(driver_, "Open");
     
      // After a moment the modal prompting for the path will disappear, and
      // the modal prompting for input will appear.
View Full Code Here

        actions.click().build().perform();
        final PFocusEvent e2 = eventsListener.poll();
        Assert.assertNotNull(e2);

        // Key press/ Key up
        actions.sendKeys("a").build().perform();
        final PKeyPressEvent e3 = eventsListener.poll();
        final PKeyUpEvent e4 = eventsListener.poll();
        Assert.assertNotNull(e3);
        Assert.assertEquals(65, e4.getKeyCode());
View Full Code Here

        WebElement popContainerTgtElem = driver.findElement(By.className(targetLocator));
        waitForElementPresent("Popup did not launch", popContainerTgtElem);
        // Close the popup either by the TAB key or the close button
        if (closeOnTabKey) {
            Actions builder = new Actions(this.currentDriver);
            builder.sendKeys(Keys.TAB,Keys.NULL).build().perform();
        } else{
          WebElement customTriggerButton = driver.findElement(By.className(buttonLocator));
          customTriggerButton.click();
        }
       
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.