mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-19 23:26:07 +00:00
refactor: Fix for maven warnings (#2157)
* fix for maven warnings * Removed unwanted dependency and htmlunit upgraded to latest Co-authored-by: Mohana Rao S V <mohana.rao.s.v@tietoevry.com>
This commit is contained in:
+3
-3
@@ -80,11 +80,11 @@ public class AlbumListPage extends Page {
|
||||
*/
|
||||
public AlbumPage selectAlbum(String albumTitle) {
|
||||
// uses XPath to find list of html anchor tags with the class album in it
|
||||
var albumLinks = (List<HtmlAnchor>) page.getByXPath("//tr[@class='album']//a");
|
||||
var albumLinks = (List<Object>) page.getByXPath("//tr[@class='album']//a");
|
||||
for (var anchor : albumLinks) {
|
||||
if (anchor.getTextContent().equals(albumTitle)) {
|
||||
if (((HtmlAnchor) anchor).getTextContent().equals(albumTitle)) {
|
||||
try {
|
||||
anchor.click();
|
||||
((HtmlAnchor) anchor).click();
|
||||
return new AlbumPage(webClient);
|
||||
} catch (IOException e) {
|
||||
LOGGER.error("An error occured on selectAlbum", e);
|
||||
|
||||
Reference in New Issue
Block a user