I am a Newbie with HtmlUnit .. I want to login on https://trash-mail.com/posteingang/ .
My Code:
public static void main(String[] args) throws FailingHttpStatusCodeException, MalformedURLException, IOException {
WebClient webClient = new WebClient(BrowserVersion.CHROME);
HtmlPage page1 = webClient.getPage("https://www.trash-mail.com/posteingang/");
HtmlForm form = page1.getFormByName("inbox-form");
I get the following error:
runtimeError: message=[An invalid or illegal selector was specified (selector: 'select option:selected' error: Invalid selector: select option:selected).] sourceName=[https://www.trash-mail.com/js/jquery-1.9.1.min.js.pagespeed.ce.OXdUuknp4M.js] line=[4] lineSource=[null] lineOffset=[0] Exception in thread "main" com.gargoylesoftware.htmlunit.ElementNotFoundException: elementName=[form] attributeName=[name] attributeValue=[inbox-form] at com.gargoylesoftware.htmlunit.html.HtmlPage.getFormByName(HtmlPage.java:647)
Do u have any Idea how this could gonna work?
Regards, MaddinCoy
It is legal to do this stuff on this site.