{"id":25776707,"url":"https://github.com/RWS/Testy","last_synced_at":"2025-02-27T06:06:54.359Z","repository":{"id":7271471,"uuid":"8584816","full_name":"RWS/Testy","owner":"RWS","description":"Automated Acceptance Testing: Selenium and Selenium WebDriver test framework for web applications (best suited for ExtJS and complex UI)","archived":false,"fork":false,"pushed_at":"2025-02-19T08:16:23.000Z","size":218323,"stargazers_count":29,"open_issues_count":1,"forks_count":30,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-02-19T09:24:51.195Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RWS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-03-05T17:14:11.000Z","updated_at":"2025-02-19T08:16:27.000Z","dependencies_parsed_at":"2024-12-11T11:25:32.666Z","dependency_job_id":"09598a00-57b1-42c0-9628-fbe3bd4f893b","html_url":"https://github.com/RWS/Testy","commit_stats":null,"previous_names":["sdl/testy"],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RWS%2FTesty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RWS%2FTesty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RWS%2FTesty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RWS%2FTesty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RWS","download_url":"https://codeload.github.com/RWS/Testy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240987435,"owners_count":19889334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-27T06:01:29.312Z","updated_at":"2025-02-27T06:06:54.351Z","avatar_url":"https://github.com/RWS.png","language":"Java","funding_links":[],"categories":["测试"],"sub_categories":[],"readme":"# Testy\n\nAutomated Acceptance Testing.\n\n[`Selenium WebDriver`](http://www.seleniumhq.org/projects/webdriver/) test framework for web applications.\nYou don't have to worry anymore about complex [`XPATH`](http://zvon.org/xxl/XPathTutorial/Output/example1.html) or [`CSS selector`](https://saucelabs.com/selenium/css-selectors) because we are taking care for you about that.\nSimply set each property on the element and we will generate the necessary selector.\nYou can combine more properties/attributes on the same selector very easy. \n\nThis project is optimized for:\n\n- [x] Dynamic html \u0026 Complex UI\n- [x] [`Sencha ExtJS`](https://www.sencha.com/products/extjs/#overview)\n- [x] [`Bootstrap`](http://getbootstrap.com/javascript/)\n- [x] Simple web applications/sites\n\n## Java Usage Example\n\n```html\n\n    \u003cbutton\u003eSave\u003c/button\u003e\n    \u003cbutton\u003eCancel\u003c/button\u003e\n    \n    \u003cdiv class=\"close\" title=\"Close\"\u003ex\u003c/div\u003e\n    \u003cspan class=\"minimize\" title=\"Minimize\"\u003e_\u003c/span\u003e\n    \n```\n\n```java\n    \n    Button saveButton   = new Button().setText(\"Save\");\n    Button cancelButton = new Button().setText(\"Cancel\");\n    \n    // more properties for selecting/testing specific element with wanted attributes\n    WebLocator closeIcon = new WebLocator().setClasses(\"close\").setTitle(\"Close\");\n    WebLocator minimIcon = new WebLocator().setClasses(\"minimize\").setTitle(\"Minimize\");\n\n```\n\n```java\n\n    public class SubscribePage {\n        private WebLocator header = new WebLocator().setClasses(\"header\");\n        private TextField emailField = new TextField().setLabel(\"Email\");\n        private WebLink subscribeLink = new WebLink(header, \"Subscribe now\");\n     \n        public void subscribe(String email) {\n            emailField.setValue(email);\n            subscribeLink.click();\n        }\n    }\n    \n    public class SubscribeTest extends TestBase {\n        SubscribePage subscribePage = new SubscribePage();\n     \n        @Test\n        public void subscribeTest() {\n            subscribePage.subscribe(\"me@testy.com\");\n        }\n    }\n```\n\n## Table and rows examples\n\n```java\n\n    public class SubscribersPage {\n        private Table table = new Table();\n        \n        public boolean unsubscribe(String email) {\n            // find row that contains specified email in second column\n            Row row = table.getRow(new Cell(2, email));\n            // find remove button inside specified row\n            Button removeButton = new Button(row, \"Remove\");\n            return removeButton.click();\n        }\n    }\n    \n    public class RemoveSubscriberTest extends TestBase {\n        SubscribersPage subscribersPage = new SubscribersPage();\n     \n        @Test\n        public void unsubscribeTest() {\n            boolean removed = subscribersPage.unsubscribe(\"me@testy.com\");\n            //... assert\n        }\n    }\n```\n\n## Prerequisites\n\n- Java\n- Maven\n\n## Getting the maven plugin\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.sdl.lt\u003c/groupId\u003e\n    \u003cartifactId\u003eTesty\u003c/artifactId\u003e\n    \u003cversion\u003e2.13.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n[Here is how these lines appear in a project pom.xml](https://github.com/nmatei/cucumber-testy-tutorial/blob/master/pom.xml)\n\n## Initialize Testy\n\n### Simple way to migrate or use Testy\nAfter you create your driver, pass the reference to Testy, then just it use as you want\n\n```java\ndriver = new FirefoxDriver();\nWebDriverConfig.init(driver);\n// then just use WebLocator or any other classes from Testy\n```\n\n### OR Create your driver using Testy much simpler\n\n```java\npublic static WebDriver driver;\nstatic {\n    startSuite();\n}\nprivate static void startSuite() {\n    try {\n        driver = WebDriverConfig.getWebDriver(Browser.FIREFOX);\n    } catch (Exception e) {\n        LOGGER.error(\"Exception when start suite\", e);\n    }\n}\n```\n\n### To use Selenium Grid you need the following:\n\n1. Set this system property: remoteDriver=true\n2. Pass the remote hub url as a parameter when initializing the WebDriver.\ne.g.: \n```java\nWebDriver driver = WebDriverConfig.getWebDriver(EnvConfig.getBrowserConfigPath(), new URL(\"http://localhost:4444/wd/hub\"));\nor \nWebDriver driver = WebDriverConfig.getWebDriver(URL remoteUrl, DesiredCapabilities capabilities);\n```\n\n[Here is how these lines appear in a project](https://github.com/nmatei/cucumber-testy-tutorial/blob/master/src/test/java/org/fasttrackit/util/TestBase.java)\n\n## Example project\n\nHere is a sample project with cucumber and Testy on Chrome browser:\n\n[Full example](https://github.com/nmatei/cucumber-testy-tutorial)\n\n\n## Release Notes\n**Release Notes for Testy 2.13.1**\n- added setChildNodes(SearchType searchType, final WebLocator... childNodes) method\n- improvement select(boolean doScroll, String... nodes) method in Tree\n- update webdriver version 3.141.59\n- TODO\n\n[Detailed Release Notes](./release-notes.md) \n\n### Getting SNAPSHOT versions of the plugin\n\n```xml\n    \u003crepositories\u003e\n        \u003crepository\u003e\n            \u003cid\u003esonatype-nexus-snapshots\u003c/id\u003e\n            \u003cname\u003esonatype-nexus-snapshots\u003c/name\u003e\n            \u003curl\u003ehttps://oss.sonatype.org/content/repositories/snapshots/\u003c/url\u003e\n        \u003c/repository\u003e\n    \u003c/repositories\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.sdl.lt\u003c/groupId\u003e\n        \u003cartifactId\u003eTesty\u003c/artifactId\u003e\n        \u003cversion\u003e2.14.0-SNAPSHOT\u003c/version\u003e\n    \u003c/dependency\u003e\n```\n\n## Demo application links\n\n- [Login](https://rawgit.com/sdl/Testy/master/src/test/functional/app-demo/login.html)\n- [Bootstrap](https://rawgit.com/sdl/Testy/master/src/test/functional/app-demo/bootstrap/index.html)\n- [Sencha ExtJs](https://rawgit.com/sdl/Testy/master/src/test/functional/app-demo/extjs/index.html)\n\n## Setting up Testy project\n\n[Setting UP](./setup.md) \n\n## License\n\nTesty is [MIT licensed](./LICENSE.md).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRWS%2FTesty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRWS%2FTesty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRWS%2FTesty/lists"}