File upload 当我们在site images.google.co.in上传图像时,文本会出现2-3秒;“正在上载文件”,我正试图取回那篇文章,但没有成功

File upload 当我们在site images.google.co.in上传图像时,文本会出现2-3秒;“正在上载文件”,我正试图取回那篇文章,但没有成功,file-upload,selenium,selenium-webdriver,File Upload,Selenium,Selenium Webdriver,当我们在site images.google.co.in上传一张图片时,2-3秒文本显示为“上传文件”,我试图获取该文本,但没有成功。下面是我使用的代码 WebDriver driver= new FirefoxDriver(); driver.manage().window().maximize(); driver.get("http://images.google.co.in/"); driver.manage().timeouts()

当我们在site images.google.co.in上传一张图片时,2-3秒文本显示为“上传文件”,我试图获取该文本,但没有成功。下面是我使用的代码

             WebDriver driver= new FirefoxDriver();

    driver.manage().window().maximize();

    driver.get("http://images.google.co.in/");

    driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

    //Click on camera type icon in search box 
    driver.findElement(By.id("qbi")).click();

    driver.findElement(By.linkText("Upload an image")).click();

    //Webelement for browse button
    WebElement UploadImg = driver.findElement(By.name("encoded_image"));

    UploadImg.sendKeys("C:\\Users\\Public\\Pictures\\Sample Pictures\\Chrysanthemum.jpg");

    WebDriverWait wait = new WebDriverWait(driver, 30);

     WebElement uploadimage = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//*[@id='qbupm']")));


     String actualtext=  uploadimage.getText();

     System.out.println(actualtext);

请添加一个html示例代码Hey Anand,它的html不是4-5行代码..所以你能看看网站吗“,如果你需要我这边的更多输入,请让我知道。