how to add <base> tag to downloaded webpage content using phantomjsdriver in java

12 views
Skip to first unread message

Santosh Gdr

unread,
Apr 10, 2015, 4:16:59 AM4/10/15
to phan...@googlegroups.com

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.
Reply all
Reply to author
Forward
0 new messages