question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to make ElementsContainer works?

See original GitHub issue

My 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. image

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:closed
  • Created 3 years ago
  • Comments:39 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
ansonliaocommented, Jan 18, 2021

Hi @asolntsev , we have already migrated the existed Selenium to the Selenide framework, and integrated it with the Allure report, (but finally, we will drop allure and migrate to reportoral). Thanks for your great work to answer my question.

1reaction
ansonliaocommented, Sep 3, 2020

I think we can close this issue.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found