My requirement is to crawl https://play.google.com/store/apps/details?hl=en&id=com.kubi.kucoin, and then simulate clicking the button "See more information on About this app" on the page to get a pop-up Version inside the box. The old version 2.40.0 can run successfully. After upgrading to , the Version cannot be obtained. Tracking found that the pop-up box div after clicking the button "See more information on About this app" is not returned.
code is here:
WebClient webClient = new WebClient(BrowserVersion.CHROME);
webClient.setAjaxController(new NicelyResynchronizingAjaxController());
webClient.setJavaScriptTimeout(10000);
webClient.setJavaScriptErrorListener(new SilentJavaScriptErrorListener());
WebClientOptions options = webClient.getOptions();
options.setCssEnabled(false);
options.setUseInsecureSSL(true);
options.setJavaScriptEnabled(true);
options.setThrowExceptionOnScriptError(false);
options.setWebSocketEnabled(false);
options.setTimeout(5000);
HtmlPage page = webClient.getPage("https://play.google.com/store/apps/details?hl=en&id=com.kubi.kucoin");
webClient.waitForBackgroundJavaScript(5000);
webClient.waitForBackgroundJavaScriptStartingBefore(5000);
String jsCode = "document.getElementsByClassName('VfPpkd-Bz112c-LgbsSe yHy1rc eT1oJ QDwDD mN1ivc VxpoF')[0].click();";
page.executeJavaScript(jsCode);
webClient.waitForBackgroundJavaScript(10000);
Document document = Jsoup.parse(page.asXml());
Element element = document.selectFirst("div:matchesOwn(Version) + div");
System.out.println(element.ownText());
element is null
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too