How to make ElementsContainer works?
See original GitHub issueMy selenide
version is the latest, and I need to introduce ElementsContainer
for my testing, from my study of ElementsContainer
in simple, but it fail, looks like ElementsContainer
is not straightforward to use, my codes as below:
public class SearchPage {
@FindBy(css = "div[class='RNNXgb']")
public SearchBlock searchBlock;
public void open() {
Selenide.open("https://www.google.com");
}
public void search(String text) {
searchBlock.searchInput.val(text).pressEnter();
}
static class SearchBlock extends ElementsContainer {
SelenideElement searchIcon
= $("div[class='hsuHs']");
SelenideElement searchInput
= $(By.name("q"));
SelenideElement voiceIconBtn
= $("div[class='hpuQDe']");
}
}
My testing code:
public void f2() {
SearchPage page = new SearchPage();
page.open();
page.search("selenide");
}
finally, I got the error as below.
As less error message from the exception, so I don’t know how to fix, could someone advise how to fix it?
Thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:39 (19 by maintainers)
Top Results From Across the Web
codeborne/selenide - Gitter
Hi Team, I have a question about dynamic locators as ElementsContainer constructors. Before latest releases I successfully used setSelf().
Read more >Container Element - ThemeFusion | Avada Website Builder
This element is the structural foundation of all page layouts created within Avada Builder, and is an integral part of making sure your...
Read more >Change elements container without changing elements position
... create element // add class work-element to created element // set positions for created element using ui param // here I have...
Read more >ElementsContainer - Selenide
Class ElementsContainer · Constructor Summary. Constructors. Constructor. Description. ElementsContainer() · Method Summary. All Methods Instance Methods Concrete ...
Read more >Grouping Elements | Your First Website: Landing Page
To create a new <div> , we simply surround groups of HTML elements with an ... also makes it much easier to specifically...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @asolntsev , we have already migrated the existed Selenium to the
Selenide
framework, and integrated it with theAllure
report, (but finally, we will dropallure
and migrate toreportoral
). Thanks for your great work to answer my question.I think we can close this issue.