I'm trying to use HtmlUnit to scrape the content of a Website. I am able to programmatically login to my account, but most of the content on the client-side is generated using Javascript (Angular JS). So my questions are:
Can we use HTMLUnit to scrape this page using Angular JS as the scripting language.
This is my code:
final WebClient webClient = new WebClient(BrowserVersion.CHROME);
WebClientOptions webClientOptions = webClient.getOptions();
webClientOptions.setJavaScriptEnabled(true);
final HtmlPage page1 = webClient.getPage(//url);
final HtmlForm form2 = page2.getFormByName("login");
final HtmlSubmitInput button = form2.getInputByValue("Sign In");
final HtmlTextInput textField = form2.getInputByName("email");
textField.setValueAttribute("//email");
final HtmlPasswordInput textField2 = form2.getInputByName("login_password");
textField2.setValueAttribute(//password);
final HtmlPage page3 = button.click();
webClient.waitForBackgroundJavaScript(30000);
Thank you in advance for your help.