I want to convert relative path to absolute path using PhantomJSDriver in java. I will get webpage content using phantomjsdriver using below code
WebDriver driver = new PhantomJSDriver(caps);
String pagecontent=driver.getPageSource().toString();
System.out.println(pagecontent);
Here,I want to add html base tag to the downloaded page content to convert all relative to absolute path. How to add base tag to page content (or) is there any other way to convert relative path to absolute path using PhantomJSDriver in java.