Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98768

java.net.MalformedURLException: unknown protocol: maps

$
0
0

I am getting Exception in Selenium Webdriver (Java)

java.net.MalformedURLException: unknown protocol: maps

While Checking all Active Links(URLs) present on the page

The Code is as follows:

for(int j=0;j<activeLinks.size();j++)
{
    String strURL = activeLinks.get(j).getAttribute("href");
    HttpURLConnection connection =  (HttpURLConnection)newURL(activeLinks.get(j).getAttribute("href")).openConnection();
    connection.connect();
    String response = connection.getResponseMessage(); //ok
    connection.disconnect();
    System.out.println(activeLinks.get(j).getAttribute("href")+"--> " +response);
}

Viewing all articles
Browse latest Browse all 98768

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>