{"id":15174191,"url":"https://gitlab.com/brewcode/selenide-pages","last_synced_at":"2025-10-26T07:31:28.876Z","repository":{"id":57739010,"uuid":"31094139","full_name":"brewcode/selenide-pages","owner":"brewcode","description":"Quickly creating a convenient, extensible PageObject hierarchy based on Selenide.\r\nAdditional functionality for working with a page and organizing elements structure.\r\nKotlin DSL for Page Object, and fully compatible with Java 11\r\nCucumber steps","archived":false,"fork":false,"pushed_at":null,"size":null,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":null,"default_branch":"main","last_synced_at":"2025-01-31T16:53:37.746Z","etag":null,"topics":["allure","cucumber","java","kotest","kotlin","page object","pages","qa","selenide","selenium"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://gitlab.com/uploads/-/system/project/avatar/31094139/pages.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-06T10:02:23.669Z","updated_at":"2023-11-20T19:25:47.912Z","dependencies_parsed_at":"2022-08-24T17:40:20.278Z","dependency_job_id":null,"html_url":"https://gitlab.com/brewcode/selenide-pages","commit_stats":null,"previous_names":[],"tags_count":4,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/brewcode%2Fselenide-pages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/brewcode%2Fselenide-pages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/brewcode%2Fselenide-pages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/brewcode%2Fselenide-pages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners/brewcode","download_url":"https://gitlab.com/brewcode/selenide-pages/-/archive/main/selenide-pages-main.zip","host":{"name":"gitlab.com","url":"https://gitlab.com","kind":"gitlab","repositories_count":4517630,"owners_count":6745,"icon_url":"https://github.com/gitlab.png","version":null,"created_at":"2022-05-30T11:31:42.605Z","updated_at":"2024-07-18T11:24:13.055Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners"}},"keywords":["allure","cucumber","java","kotest","kotlin","page object","pages","qa","selenide","selenium"],"created_at":"2024-09-27T11:40:40.714Z","updated_at":"2025-10-26T07:31:28.871Z","avatar_url":"https://gitlab.com/uploads/-/system/project/avatar/31094139/pages.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Maven Central](https://img.shields.io/maven-central/v/org.brewcode/selenide-pages-core)](https://search.maven.org/#search|ga|1|selenide-pages-core)\n# Selenide pages\n\n![selenide pages](pages.png)\n---\n\nFramework based on [Selenide](https://github.com/selenide/selenide) provided convenient functional to create and manage\nyour app [Page Objects](https://www.selenium.dev/documentation/guidelines/page_object_models/) in automation testing.\n\n## Description\n\n- Quickly creating a convenient, extensible PageObject hierarchy based on Selenide.\n- Additional functionality for working with a page and organizing elements structure.\n- Kotlin DSL for Page Object, and fully compatible with Java 17\n- Cucumber steps for using Page Objects\n\n## Modules\n### [`selenide-pages-core`](selenide-pages-core/README.md)\nMain module\n\n### [`selenide-pages-cucumber`](selenide-pages-cucumber/README.md)\nCucumber steps provided `selenide-pages-core` and `Selenide` functions in Gherkin `features` \n\n### [`selenide-pages-sample`](selenide-pages-sample/README.md)\nExample of use on `Kotlin` and `Java`\n\u003e Very interesting! Have a look before using ...\n\n## Getting started\n\n#### Add dependency\n\nAdd `selenide-pages-core` dependency and your favorite testing framework for example `junit-jupiter` \n```groovy\ndependencies {\n    testImplementation \"org.brewcode:selenide-pages-core:1.0.0\"\n    testImplementation \"org.junit.jupiter:junit-jupiter:5.8.2\"\n}\n```\nThe `selenide-pages-core` brings with transitive dependencies:\n- `selenide`\n- `selenium 4`\n- `chrome driver` (without another drivers sush as firefox or edge)\n- `awaitility`\n- `kotlin`\n- `kotest assertions`\n- `slf4j`\n\nThe dependencies above are necessary for the operation of our library. But you can disable it and override \n```groovy\ndependencies {\n    testImplementation(\"org.brewcode:selenide-pages-core:1.0.0\") { transitive false }\n}\n```\n\n#### Create first page\n\n```java\n/**\n * Define selenide page via @Page annotation. Must extend BasePage class.\n * \n * value = \"Getting Started\" - page name for log message\n * path = \"/tutorial/\" - expected path. Will check on page open verify, and will append when open this page\n * expectedTitle = \"Getting Started\" - The title text will check on page open verify\n */\n@Page(value = \"Getting Started\", path = \"/tutorial/\", expectedTitle = \"Getting Started\")\npublic class DockerGettingStartedMainPage extends BasePage\u003cDockerGettingStartedMainPage\u003e {\n\n    /**\n     * Create element collection.\n     * With alias \"Paragraphs\" to use in log messages.\n     * Search by tag name.\n     * \n     * \"required = true\" - This element must be visible on the page after loading. When you open the page, this element must be visible, otherwise an error will occur\n     */\n    @Element(value = \"Paragraphs\", tagName = \"h2\", required = true)\n    public ElementsCollection paragraphs;\n\n    public GettingStartedNavigation gettingStartedNavigation;\n\n    /**\n     * The page block defined.\n     * Must extend Block class.\n     * \n     * Be aware - @Element annotation uses on class instead of field. \n     * But you may use field annotation and field annotation has a higher priority.\n     */\n    @Element(value = \"Getting started navigation\", css = \"nav.md-nav--primary\u003eul\")\n    public static class GettingStartedNavigation extends Block {\n\n        /**\n         * Collection of page blocks.\n         */\n        @Element(value = \"Пункты навигации\", xpath = \"./li\")\n        public Blocks\u003cNavigationItem\u003e navigationItemList;\n    }\n\n    public static class NavigationItem extends Block {\n\n        @Element(value = \"Navigation item\", tagName = \"a\", required = true)\n        public SelenideElement gettingStartedNavigation;\n    }\n}\n```\n\n- Use `@Page` annotation on page class\n- Your page class must inherit the `BasePage` with parameter as self class\n- Use `@Element` annotation for `SelenideElement`, `Block` and `Blocks\u003cT\u003e`\n- Your block class must inherit the `Block`\n\n#### Create test\n\n```java\npublic class FunctionalTest {\n\n    @Test\n    public void test() {\n        final Pages pages = Pages.PagesFactory\n            .createWithStaticSelenideDriver(\"http://localhost\"); // Create Page Factory\n        final DockerGettingStartedMainPage page = pages\n            .page(DockerGettingStartedMainPage.class) // Create page\n            .open() // open page with path from @Page annotation\n            .verify(); // verify that page opened successfully, url is correct, title is expected, all required elements is displayed\n        \n        // interact with element collection and check third element text is not empty\n        page.paragraphs.get(2).shouldNotBe(empty);\n\n        // get block\n        final GettingStartedNavigation block = page.gettingStartedNavigation;\n        block.navigationItemList.getSelf().shouldHave(sizeGreaterThan(0)); // check that list is loaded\n        block.navigationItemList.get(1).gettingStartedNavigation.should(appear); // get element and check\n    }\n}\n```\n\n## Advanced Usage\n\n`in progress ...`\n\n## Kotlin DSL\n\n## Support\n\n- Create an issue on [GitLab selenide-pages](https://gitlab.com/brewcode/selenide-pages)\n- Create an issue on [GitHub selenide-pages](https://github.com/kochetkov-ma/selenide-pages)\n\n**Kochetkov Maxim** - [kochetkov-ma@yandex.ru](mailto:kochetkov-ma@yandex.ru)\n\n## Roadmap\n\nCucumber steps module - expected release date `30.01.2022`\n\n## Contributing\n\nMail to me [kochetkov-ma@yandex.ru](mailto:kochetkov-ma@yandex.ru), and I will add you to GitLab Group\n\n## Authors and acknowledgment\n\n**Kochetkov Maxim** - [kochetkov-ma@yandex.ru](mailto:kochetkov-ma@yandex.ru)\n**Frolov Sergey** - [tbd](mailto:tbd)\n\n## License\n\n`Apache License 2.0`\n\n## Project status\n\nReleased on January 2021\n\n`ACTIVE DEVELOPING`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2Fbrewcode%2Fselenide-pages","html_url":"https://awesome.ecosyste.ms/projects/gitlab.com%2Fbrewcode%2Fselenide-pages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2Fbrewcode%2Fselenide-pages/lists"}