[Solved]Why findElementsByXPath not allowing List<WebElement>

Hi all,

I am trying to use AndroidDriver and when i am trying to use findElementsByXPath, which shows an error message saying “Syntax error, parameterized types are only available if source level is 1.5 or greater”

Following is the code i am trying:

File objFile=new File(strApkFilePath);
        DesiredCapabilities capabilities=new DesiredCapabilities();
        capabilities.setCapability("deviceName", "Testing");
        capabilities.setCapability("app", objFile.getAbsolutePath());
        
        try
        {
            driver=new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
List<WebElement> objSkipToLibrary=driver.findElementsByXPath("//android.widget.TextView[@text='Skip to find your library now']");

When i use List object i see Syntax error, “Syntax error, parameterized types are only available if source level is 1.5 or greater”

Thanks,
Uday

The problem get solved, after i follow the Eclipse suggestion to fix the error, by accepting the suggestion to change the source jdk to 1.5