简体   繁体   中英

How to @Find for <list>webelement?

When you declare one webelement in the page object, you can do something like:

@FindBy(name="q") private WebElement searchBox;

How do declare for multiple Elements? The following doesn't work:

@FindBys(class="li") private <List>WebElement searchBoxes;

Never mind. I was mistaken. It is possible to do: @FindBy(name="q") private List searchBoxes;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM