【发布时间】:2014-05-21 16:35:04
【问题描述】:
任务是在https://play.google.com/store/apps/category/FINANCE/collection/topselling_paid中按下“更多”按钮
这是截图 http://c2n.me/i9LC1O
我的代码是:
String url = "https://play.google.com/store/apps/category/FINANCE/collection/topselling_paid";
WebDriver driver = new HtmlUnitDriver();
driver.manage().timeouts().implicitlyWait(100000, TimeUnit.SECONDS);
driver.get(url);
//Collects ONLY first 60 link. `enter code here`But I need more....
ArrayList<WebElement> linksToApp = (ArrayList<WebElement>) driver
.findElements((By.className("title")));
ArrayList<String> urlToApp = new ArrayList<String>();
请帮帮我。
【问题讨论】:
-
对我来说那个按钮是隐藏的。因此,单击它不会有任何效果。当我向下滚动页面时,“显示更多”是自动完成的,因此我不知道你想要实现什么,因为这不是页面看起来要做的。
-
您没有看到“更多”按钮。我说的对吗?
-
是的。根据我的调查,它从未显示过,当您使用 AJAX 请求向下滚动时,页面会自动获得“更多”结果。
-
请在其他浏览器的帮助下尝试查看“更多”按钮。
标签: java button selenium webdriver