{"id":23651882,"url":"https://github.com/microfocus/leanft-selenium-js-sdk","last_synced_at":"2025-10-06T12:37:32.331Z","repository":{"id":28013187,"uuid":"115598275","full_name":"MicroFocus/leanft-selenium-js-sdk","owner":"MicroFocus","description":"LeanFT for Selenium JavaScript SDKs that extend the WebDriver API with additional locators and utilities. By using this SDKs you can create more robust or generic identifications for your objects, and use built-in utilities rather than writing them yourself from scratch.","archived":false,"fork":false,"pushed_at":"2022-03-14T08:26:44.000Z","size":112,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-02T07:35:11.546Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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://github.com/MicroFocus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-12-28T07:37:51.000Z","updated_at":"2021-11-15T10:25:49.000Z","dependencies_parsed_at":"2022-08-07T13:01:28.589Z","dependency_job_id":null,"html_url":"https://github.com/MicroFocus/leanft-selenium-js-sdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MicroFocus/leanft-selenium-js-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroFocus%2Fleanft-selenium-js-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroFocus%2Fleanft-selenium-js-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroFocus%2Fleanft-selenium-js-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroFocus%2Fleanft-selenium-js-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MicroFocus","download_url":"https://codeload.github.com/MicroFocus/leanft-selenium-js-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroFocus%2Fleanft-selenium-js-sdk/sbom","scorecard":{"id":93705,"data":{"date":"2025-08-11","repo":{"name":"github.com/MicroFocus/leanft-selenium-js-sdk","commit":"e1c4690e2c02a6a8b2199ed16d20a7d6c45706f7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 2/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T08:25:06.031Z","repository_id":28013187,"created_at":"2025-08-15T08:25:06.031Z","updated_at":"2025-08-15T08:25:06.031Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273065038,"owners_count":25039274,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-12-28T16:48:48.540Z","updated_at":"2025-10-06T12:37:32.216Z","avatar_url":"https://github.com/MicroFocus.png","language":"JavaScript","readme":"# leanft-selenium-js-sdk\n\nLeanFT JavaScript SDK for Selenium\n\nLeanFT for Selenium JavaScript SDK extends the Selenium WebDriver API with locators and utilities that enable creating tests that are more robust, and reduces Selenium test automation and maintenance efforts.\n\n## Install\n\n```\nnpm install leanft-selenium-js-sdk --save\n```\n\n## Usage Example\n\nThe following example demonstrates locating elements by their visible text.\n\n```js\nvar webdriver = require(\"selenium-webdriver\");\nvar Builder = webdriver.Builder;\nvar LeanFT4S = require(\"leanft-selenium-js-sdk\");\nvar By = LeanFT4S.By(webdriver.By);\n\nvar driver = new Builder().forBrowser(\"chrome\").build();\n\ndriver.get(\"http://www.google.com/en\");\n\n// Locates the \"Google Search\" button\nvar element = driver.findElement(By.visibleText(\"Google Search\"));\n\ndriver.quit();\n```\n\nThe following example demonstrates locating elements using a regular expression.\n\n```js\nvar webdriver = require(\"selenium-webdriver\");\nvar Builder = webdriver.Builder;\nvar LeanFT4S = require(\"leanft-selenium-js-sdk\");\nvar By = LeanFT4S.By(webdriver.By);\n\nvar driver = new Builder().forBrowser(\"chrome\").build();\ndriver.get(\"http://www.google.com\");\n\nvar element = driver.findElement(By.name(/^btn/));\n\ndriver.quit();\n```\n\nLocate an element using its HTML attributes and highlight it.\n\n```js\nvar webdriver = require(\"selenium-webdriver\");\nvar Builder = webdriver.Builder;\nvar LeanFTForSelenium = require(\"leanft-selenium-js-sdk\");\nvar Utils = LeanFTForSelenium.Utils;\nvar By = LeanFTForSelenium.By(webdriver.By);\n\nvar driver = new Builder().forBrowser(\"chrome\").build();\n\ndriver.get(\"http://www.google.com\");\n\nvar element = driver.findElement(By.attributes({\n\t\"class\": \"gsfi lst-d-f\",\n\t\"id\": \"lst-ib\"\n}));\n\nUtils.highlight(element);\n\ndriver.quit();\n```\n\n## API\n\nLeanFT for Selenium API reference documentation can be found [here\n](https://admhelp.microfocus.com/leanft/en/latest/HelpCenter/Content/JS4S_SDK/top-Selenium-JS.htm)\n\n### New Locators\n\n#### By.visibleText\n\nReturns a new locator that enables finding elements based on their visible text.\n\n#### By.visible\n\nReturns a new locator that enables finding elements based on their visibility.\n\n#### By.role\n\nReturns a new locator that enables finding elements based on their role.\n\n#### By.type\n\nReturns a new locator that enables finding elements based on their type.\n\n#### By.attributes\n\nReturns a new locator that enables finding elements based on their attributes (one or more). Attribute values can be defined using regular expressions.\n\n#### By.styles\n\nReturns a new locator that enables finding elements based on their computed style (one or more). Computed style values can be defined using regular expressions.\n\n#### By.each\n\nReturns a new locator that enables finding elements based on a combination of locators (attributes, tags, styles etc.).\n\n#### By.any\n\nReturns a new locator that locates elements that match at least one of the locators provided (OR).\n\n#### By.chained\n\nReturns a new locator that locates elements by using locators that describe the elements and their ancestors (higher level elements).\n\n### Regular Expression Support\n\nAll the locators which accept a string as a value of the element's property, were extended to support regular expressions including the following Selenium native locators:\n\n* By.id\n* By.className\n* By.linkText\n* By.name\n* By.tagName\n\n## Utilities\n\n### Utils.getSnapshot\n\nReturns a snapshot (image) of the selenium element as a Base64 string.\n\n### Utils.highlight\n\nHighlights the selenium element in the browser.\n\n\n## build\n\nTo build the project, clone it and run the following command:\n\n```\nnpm install gulp -g\nnpm install\ngulp build\n```\n\n## Running Test\n\nTo run the unit-tests of the project after you have built it run the following command:\n\n```\ngulp test\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrofocus%2Fleanft-selenium-js-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrofocus%2Fleanft-selenium-js-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrofocus%2Fleanft-selenium-js-sdk/lists"}