How to fetch all links and click those links one by one using Selenium WebDriver

后端 未结 6 1363
深忆病人
深忆病人 2021-01-05 22:59

I am using Selenium WebDriver with java.

I am fetching all links from webpage and trying to click each link one by one. I am getting below error:

6条回答
  •  难免孤独
    2021-01-05 23:13

        WebDriver _driver = new InternetExplorerDriver();
        _driver.navigate().to("http://www.google.co.in/");
        List  alllinks = _driver.findElements(By.tagName("a"));
    
        for(int i=0;i

提交回复
热议问题