{"id":20522758,"url":"https://github.com/testxio/standard-objects","last_synced_at":"2025-07-09T13:39:16.466Z","repository":{"id":85552779,"uuid":"72828687","full_name":"testxio/standard-objects","owner":"testxio","description":"This package contains standard objects for TestX.","archived":false,"fork":false,"pushed_at":"2019-09-11T11:58:23.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-06T00:44:32.711Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/testxio.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-04T08:31:29.000Z","updated_at":"2019-09-11T11:58:19.000Z","dependencies_parsed_at":"2023-03-03T15:15:27.678Z","dependency_job_id":null,"html_url":"https://github.com/testxio/standard-objects","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/testxio/standard-objects","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testxio%2Fstandard-objects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testxio%2Fstandard-objects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testxio%2Fstandard-objects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testxio%2Fstandard-objects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/testxio","download_url":"https://codeload.github.com/testxio/standard-objects/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testxio%2Fstandard-objects/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264468801,"owners_count":23613156,"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":"2024-11-15T22:36:42.178Z","updated_at":"2025-07-09T13:39:16.450Z","avatar_url":"https://github.com/testxio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TestX Standard objects\n\nThis package contains standard objects for [testx](http://testx.io/testx). These object locators come from [Protractor](https://www.protractortest.org).\n\n## Installation\n\nInstall the package with:\n\n```sh\nnpm install @testx/objects-standard --save\n```\n\n## Usage\n\n### In your object files\n\n```JavaScript\nconst { xpath, css } = require('@testx/objects-standard');\n\nmodule.exports = {\n  \"MyObject\": xpath(\"//input\"),\n  \"MyOtherObject\": css(\".cool-class\")\n}\n```\n\nAnd then in your **testx** script:\n\n```testx\n- go to:\n    url: /\n- set:\n    MyObject: some stuff\n    MyOtherObject: other things\n```\n\n### Directly in your **testx** scripts\n\nAdd to your tests like any other **testx** node module. In your config file, as part of the _onPrepare_ function:\n\n```JavaScript\ntestx.objects.add(require('@testx/objects-standard'))\n```\n\nThen use these as any other (functional) object reference:\n\n```testx\n- go to:\n    url: /\n- set:\n    linkText('Login'):\n    name('username'): testuser\n    name('password'): verysecret\n    buttonText('Login'):\n```\n\n**NOTE: Avoid using it this way too often or you may end up with fragile set of tests.**\n\n## Available objects\n\nThis package exposes almost all non-angular protractor (web driver++) element locators. It also adds some custom ones.\n\n| Object reference                                                                                       | Description                                                            |\n| ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------- |\n| [css](http://www.protractortest.org/#/api?view=webdriver.By.css)                                       | Locates elements using a CSS selector.                                 |\n| [xpath](http://www.protractortest.org/#/api?view=webdriver.By.xpath)                                   | Locates elements matching a XPath selector.                            |\n| [id](http://www.protractortest.org/#/api?view=webdriver.By.id)                                         | Locates an element by its ID.                                          |\n| [name](http://www.protractortest.org/#/api?view=webdriver.By.name)                                     | Locates elements whose name attribute has the given value.             |\n| [linkText](http://www.protractortest.org/#/api?view=webdriver.By.linkText)                             | Locates link elements whose visible text matches the given string.     |\n| [partialLinkText](http://www.protractortest.org/#/api?view=webdriver.By.partialLinkText)               | Locates link elements whose visible text contains the given substring. |\n| [className](http://www.protractortest.org/#/api?view=webdriver.By.className)                           | Locates elements that have a specific class name.                      |\n| [tagName](http://www.protractortest.org/#/api?view=webdriver.By.tagName)                               | Locates elements with a given tag name.                                |\n| [buttonText](http://www.protractortest.org/#/api?view=ProtractorBy.prototype.buttonText)               | Find a button by text.                                                 |\n| [partialButtonText](http://www.protractortest.org/#/api?view=ProtractorBy.prototype.partialButtonText) | Find a button by partial text.                                         |\n| [cssContainingText](http://www.protractortest.org/#/api?view=ProtractorBy.prototype.cssContainingText) | Find elements by CSS which contain a certain string.                   |\n| [deepCss](http://www.protractortest.org/#/api?view=ProtractorBy.prototype.deepCss) | Find an element by css selector within the Shadow DOM.                   |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestxio%2Fstandard-objects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftestxio%2Fstandard-objects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestxio%2Fstandard-objects/lists"}