Skip to content

Instantly share code, notes, and snippets.

@lazaropj
Created February 13, 2015 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lazaropj/68e47c40d171d71bd7b2 to your computer and use it in GitHub Desktop.
Save lazaropj/68e47c40d171d71bd7b2 to your computer and use it in GitHub Desktop.
public static void main(String[] args) {
// String consultaSimplesURL = "http://www8.receita.fazenda.gov.br/SIMPLESNACIONAL/aplicacoes.aspx?id=21";
String consultaSimplesURL = "http://www.santander.com.br";
HashMap<String,Object> inflate = new HashMap<String,Object>();
// inflate.put("cnpj","ContentPlaceHolderConteudo_lblCNPJ::text");
// inflate.put("nomeEmpresaResult","ContentPlaceHolderConteudo_lblNomeEmpresa::text");
// inflate.put("situacaoResult","ContentPlaceHolderConteudo_lblSituacaoSimples::text");
SeleniumCrawlerBuilder scb = new SeleniumCrawlerBuilder(consultaSimplesURL);
// scb.forwardBySrcElem("frame")
// .setElementInput("//input[@class='caixaTexto']", "20182807000108")
// .breakCaptcha("imgcaptcha", "captcha")
// .click("ContentPlaceHolderConteudo_btnConfirmar")
// .populateResult(inflate).execute();
//*[@id="txtCPF"]
scb.setElementInput("//*[@id='txtCPF']", "01171994192")
.click("//*[@id='hrefOk']")
.populateResult(inflate).execute();
System.out.println(inflate);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment