'How to pass string arraylist into contains() method as parameter?

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        System.setProperty("webdriver.chrome.driver","D:\\ChromeDriver\\chromedriver.exe");  
        WebDriver driver = new ChromeDriver();
        driver.get("https://411mania.com/wrestling/category/tv-report/");
        WebElement contents = driver.findElement(By.className("article_section_wrapper wrestling article_category_wrapper tv-report"));
        List<WebElement> links = contents.findElements(By.tagName("a"));
        String clickonlinkTab=Keys.chord(Keys.CONTROL, Keys.ENTER);
        String[] a = {"TALK, WxW, NJPW, Impact","Dark","Elevation"};
        for (int i = links.size() - 1; i >= 0; i--) {
            if (!(links.get(i).getText().contains(a))) //Eclipse gives me error at this line.
                    {
                links.get(i).sendKeys(clickonlinkTab);
            }
        }
}

I am trying to iterate each links of TV reports and skip the links using string arraylist.

Error: Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
The method contains(CharSequence) in the type String is not applicable for the arguments (String[])

at hetj.Gssm.main(Gssm.java:26)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source