selenium 上传文件。

上传文件 
driver.findElement(By.xpath("//input[@type='file']"))).sendKeys("C:\\testContent.pdf");

action

 

Actions actionObject = new Actions(driver);           

 actionObject.keyDown(Keys.CONTROL).sendKeys(Keys.F5).keyUp(Keys.CONTROL).perform();   

posted @ 2013-10-24 14:35  小毛驴  阅读(219)  评论(0编辑  收藏  举报