我试图从excel文件读取,但我收到错误Xls_Reader无法解析为某种类型,如何解决它

时间:2016-07-23 08:28:20

标签: eclipse selenium selenium-webdriver

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;



public class multicheckbox {


    public static void main(String[] args) {


        WebDriver driver= new FirefoxDriver();
        driver.get("http://www.jobserve.com/au/en/Job-Search/");
        driver.findElement(By.xpath(".//*[@id='ddcl-selInd']/span/span")).click();
        driver.findElement(By.xpath(".//*[@id='ddcl-selInd-ddw']/div/div[1]/label")).click();
        int selection=9;
            Xls_Reader ob1=new Xls_Reader("C:\\Users\\saurovs\\workspace\\New\\java\\firsttest.xlsx");// i am getting error on this line
        String ob2= ob1.getCelldata("selenium","indexvalue",2);
        String selections[]= ob2.split(",");
        String xpath_start= ".//*[@id='ddcl-selInd-ddw']/div/div[";
        String xpath_end="]/label";
        for(int i=1; i<selections.length;i++)
        driver.findElement(By.xpath(xpath_start + selections[i] + xpath_end)).click();

    }}

我已添加完整脚本,请帮我解决问题。

Xls_Reader无法解析为某种类型 Xls_Reader无法解析为类型

0 个答案:

没有答案