1

While working with Pages in FluentLenium @FindBy can be used to locate a FluentWebElement:

@FindBy(id = "one")
FluentWebElement exactlyOne;

This works perfectly fine. But now I need to locate multiple elements:

@FindBy(tagName = "p")
List<FluentWebElement> allP;

I cannot make this to work. I tried declaring the field as: List, FluentList even List but I always get null.

I am using: Selenium: 2.46.0, FluentLenium: 0.10.3

Rafal Borowiec
  • 5,124
  • 1
  • 24
  • 20

1 Answers1

0

I checked the source code and it seems like with (unreleased yet) version 0.10.4 it is fixed.

@FindBy(className = "small")
FluentList<FluentWebElement> smalls;

Details of the commit: https://github.com/FluentLenium/FluentLenium/commit/2e22e244caa0b4b178ec72ceddd8680c6fbe4c46

Rafal Borowiec
  • 5,124
  • 1
  • 24
  • 20