{"id":19149999,"url":"https://github.com/smashingboxes/seleniumtoolkit","last_synced_at":"2025-10-11T00:36:59.987Z","repository":{"id":140669279,"uuid":"93196127","full_name":"smashingboxes/SeleniumToolkit","owner":"smashingboxes","description":"SeleniumToolkit is a Java library that allows for faster development of functional automation testing scripts with Selenium.","archived":false,"fork":false,"pushed_at":"2019-04-03T22:00:25.000Z","size":20023,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-02-22T20:43:42.773Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smashingboxes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-06-02T19:08:07.000Z","updated_at":"2019-04-03T22:00:27.000Z","dependencies_parsed_at":"2024-07-16T16:38:11.139Z","dependency_job_id":null,"html_url":"https://github.com/smashingboxes/SeleniumToolkit","commit_stats":null,"previous_names":[],"tags_count":67,"template":false,"template_full_name":null,"purl":"pkg:github/smashingboxes/SeleniumToolkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smashingboxes%2FSeleniumToolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smashingboxes%2FSeleniumToolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smashingboxes%2FSeleniumToolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smashingboxes%2FSeleniumToolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smashingboxes","download_url":"https://codeload.github.com/smashingboxes/SeleniumToolkit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smashingboxes%2FSeleniumToolkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005647,"owners_count":26083942,"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-10-10T02:00:06.843Z","response_time":62,"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-11-09T08:10:21.308Z","updated_at":"2025-10-11T00:36:59.971Z","avatar_url":"https://github.com/smashingboxes.png","language":"Java","readme":"# SeleniumToolkit\n\nSeleniumToolkit is a Java library that allows for faster development of functional automation testing scripts with Selenium.\n\nPlease note: Further updates and maintenance for the SeleniumToolkit will be continued in the forked repository located here - https://github.com/dwhit88/SeleniumToolkit.\n\nThe toolkit handles the following:\n\n* Executing Selenium commands transparently\n* Running test scripts in Chrome, Firefox, and Safari with headless option for Chrome and Firefox\n* Running test scripts in SauceLabs for remote/virtual testing (SauceLabs account required)\n* Sending test run results to PractiTest for documentation (PractiTest account required)\n* WebDriver version management and configuration according to given parameters\n* Printing executed steps in the console in a readable format\n\nThe toolkit currently has the following integrations:\n\n* SauceLabs\n* PractiTest\n\nDependencies\n* Selenium-RC 1.0-20081010.060147\n* Selenium-Java 3.8.1\n* JUnit 4.12\n* TestNG 6.11\n* WebDriverManager 2.2.1\n* Sauce TestNG 2.1.21\n\n# Gradle setup:\n```\ndependencies {\n  compile 'com.github.smashingboxes:SeleniumToolkit:0.7.9'\n}\n```\n\n# Initializing the driver\n\nFor basic driver initialization:\n```\nDrivers.driverInit(browser, appAddress, headless)\n```\n\nFor SauceLabs driver initialization:\n```\nDrivers.driverInit(browser, appAddress, platform, runSauceLabs, slUser, slPass, headless)\n```\n\nFor info about available platforms in SauceLabs, go to https://wiki.saucelabs.com/display/DOCS/Platform+Configurator#/. Please note that the \"runSauceLabs\" and \"headless\" parameters are of boolean type in order to provide the option to run particular tests locally in spite of your SauceLabs setup.\n\n#Toolkit Commands\n\nThe Commands.java class contains the bulk of the commands that can be used in the Toolkit. Typically, each command requires a WebElement object and a short Description string. The Selenium action would be done on the WebElement object and the short Description would be used for the console printout to identify which steps have been executed.\n\nBasic example:\nYour testing code would look like this:\n```\n//Method 1 for getting the WebElement object (The Selenium Way)\nWebElement paragraph = driver.findElement(By.id(\"text\"));\n\n//OR\n\n//Method 2 for getting the WebElement object (The TestNG Way)\n@FindBy(id = \"text\")\npublic static WebElement paragraph = null;\n\n//THEN\n\n//Assert that the text found in the given WebElement contains the expected value\nCommands.assertTextContains(paragraph, \"Foobar\", \"Asserting that [Foobar] is found in the paragraph WebElement\");\n```\n\nThe SeleniumToolkit method for handling the \"assertTextContains\" function:\n```\n//The SeleniumToolkit command:\npublic static void assertTextContains(WebElement element, String expectedValue, String desc){\n  printStep(\"assertTextContains\", desc);\n  if (!element.getText().contains(expectedValue)){\n    Assert.fail(\"[\" + element.getText() + \"] doesn't contain the text [\" + expectedValue + \"].\");\n  }\n}\n```\n\nHere is a list of all of the current SeleniumToolkit commands for quick reference. (Please note that any commands not listed here may be private or not utilized anymore):\n* assertClick\n* assertInTable\n* assertInList\n* assertPageSource\n* assertNotInList\n* assertRadio\n* assertTextEquals\n* assertTextContains\n* click\n* clickOffSet\n* enterText\n* fileUpload\n* hoverOver\n* printStep\n* uploadInputHidden\n* uploadInputHiddenLoop\n* scrollByPosition\n* scrollToElement\n* scrollToTopOfPage\n* scrollToBottomOfPage\n* scrollToRightOfPage\n* selectOption\n* switchToIFrame\n* waitForAssert\n* waitForElement\n* waitForSeconds\n* waitForURL\n* waitForNotURL\n\n\n#SauceLabs Integration (Requires active account)\n\nTo utilize the integration, use the following method:\n```\nWebDriver driver = SauceLabsUtils.sauceLabsConfig(slUser, slPass, browser, platform, appAddress)\n```\n\nThis method will return the appropriate type of WebDriver based on the given browser (\"chrome\", \"firefox\", \"safari\").\n\n\n#PractiTest Integration (Requires active account)\n\nTo utilize the integration, it would be best to use the following method in a TestNG listener class:\n```\nPractiTestRequests.executeTestRun(devEmail, apiToken, projectId, testSetId, testId, result)\n```\n\nNote: the \"result\" parameter is the ITestResult object that is provided by TestNG in the listener class. For more info about this class, visit https://www.guru99.com/listeners-selenium-webdriver.html\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmashingboxes%2Fseleniumtoolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmashingboxes%2Fseleniumtoolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmashingboxes%2Fseleniumtoolkit/lists"}