Revision history [back]

click to hide/show revision 1
initial version

answered 2011-11-17 02:51:17 +0800

matthewgo gravatar image matthewgo

Hi digulla, The following is a simple sample

                WebDriver driver = new FirefoxDriver();

            WebElement element = driver.findElement("zk_comp_5"));   // the input id

            Actions builder = new Actions(driver);

                //Use Keys.LEFT_CONTROL here

                //zul alert is not a js alert, it calls; 
            //Alert alert = driver.switchTo().alert();

            //wait for the msgbox generated, or the selenium will execute faster than the browser;
            //we need to find Element ourselves
            WebElement alertOK = driver.findElement("zk_comp_14")); //the OK button's ID in the msgbox  
            new Actions(driver).click(alertOK).build().perform();

            builder.sendKeys(element, Keys.ENTER).perform();

For more information please refer to smalltalk

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More