Package org.zkoss.test

Examples of org.zkoss.test.JavascriptActions$ScriptAction


  public void dragColumnToResize(int col, int newSize) {
    Header columnHeader = topPanel.getColumnHeader(col);
    JQuery from = columnHeader.getBoundary();
   
    int xOffset = newSize - columnHeader.getWidth();
    new JavascriptActions(webDriver)
    .mouseOver(from, MouseButton.LEFT)
    .mouseDown(from, MouseButton.LEFT)
    .mouseMove(from, MouseButton.LEFT)
    .mouseMove(from, MouseButton.LEFT, xOffset, 0)
    .mouseUp(from, MouseButton.LEFT)
View Full Code Here


    Header rowHeader = spreadsheet.getLeftPanel().getRowHeader(row);
    JQuery from = rowHeader.getBoundary();
   
    int headerBorder = rowHeader.jq$n().zk().sumStyles("tb", Style.BORDERS);
    int yOffset = (newSize + headerBorder) - rowHeader.getHeight();
    new JavascriptActions(webDriver)
    .mouseOver(from, MouseButton.LEFT)
    .mouseDown(from, MouseButton.LEFT)
    .mouseMove(from, MouseButton.LEFT)
    .mouseMove(from, MouseButton.LEFT, 0, yOffset)
    .mouseUp(from, MouseButton.LEFT)
View Full Code Here

    JQuery dropAt = spreadsheet.getCell(targetRow, targetCol).jq$n();
    dragAction(drag, dropAt);
  }
 
  private void dragAction(JQuery drag, JQuery dropAt) {
    new JavascriptActions(webDriver)
    .mouseOver(drag, MouseButton.LEFT)
    .mouseDown(drag, MouseButton.LEFT)
    .mouseMove(drag, MouseButton.LEFT)
    .mouseMove(dropAt, MouseButton.LEFT)
    .mouseUp(dropAt, MouseButton.LEFT)
View Full Code Here

  public void pageUp(int row, int col) {
    spreadsheet.focus(row, col);
   
    JQuery target = spreadsheet.jq$n();
    int keycode = Keycode.PAGE_UP.intValue();
    new JavascriptActions(webDriver)
    .keyDown(target, keycode)
    .keyUp(target, keycode)
    .perform();
   
    timeBlocker.waitResponse();
View Full Code Here

  public void pageDown(int row, int col) {
    spreadsheet.focus(row, col);
   
    JQuery target = spreadsheet.jq$n();
    int keycode = Keycode.PAGE_DOWN.intValue();
    new JavascriptActions(webDriver)
    .keyDown(target, keycode)
    .keyUp(target, keycode)
    .perform();
   
    timeBlocker.waitResponse();
View Full Code Here

    sendKeys(row, col, keys);
   
    try {
//      spreadsheet.getInlineEditor().jq$n().getWebElement().sendKeys(Keys.ENTER);
     
      new JavascriptActions(webDriver)
      .enter(spreadsheet.getInlineEditor().jq$n())
      .perform();
    } catch (ElementNotVisibleException ex) {
      //protect sheet will cause ElementNotVisibleException ex
    }
View Full Code Here

 
  public void enter(JQuery target) {
    if (target == null) {
      target = spreadsheet.jq$focus();
    }
    new JavascriptActions(webDriver).enter(target).perform();
    timeBlocker.waitResponse();
  }
View Full Code Here

 
  public void esc(JQuery target) {
    if (target == null) {
      target = spreadsheet.jq$focus();
    }
    new JavascriptActions(webDriver).esc(target).perform();
    timeBlocker.waitResponse();
  }
View Full Code Here

  }
 
  public void delete(int row, int col) {
    spreadsheet.focus(row, col);
    JQuery target = spreadsheet.jq$n();
    new JavascriptActions(webDriver).delete(target).perform();
    timeBlocker.waitResponse();
  }
View Full Code Here

  }

  public void ctrlCopy(int tRow, int lCol, int bRow, int rCol) {
    spreadsheet.setSelection(tRow, lCol, bRow, rCol);
   
    new JavascriptActions(webDriver)
    .ctrlCopy(spreadsheet.jq$n())
    .perform();
   
    timeBlocker.waitResponse();
  }
View Full Code Here

TOP

Related Classes of org.zkoss.test.JavascriptActions$ScriptAction

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.