{"id":20350008,"url":"https://github.com/webbestmaster/se-core","last_synced_at":"2026-06-05T12:31:29.816Z","repository":{"id":65493519,"uuid":"139120582","full_name":"webbestmaster/se-core","owner":"webbestmaster","description":"Selenium Web Driver Auto Test Core.","archived":false,"fork":false,"pushed_at":"2018-06-29T10:01:25.000Z","size":42772,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T20:35:27.745Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webbestmaster.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}},"created_at":"2018-06-29T08:07:25.000Z","updated_at":"2018-06-29T10:01:26.000Z","dependencies_parsed_at":"2023-01-26T02:46:24.488Z","dependency_job_id":null,"html_url":"https://github.com/webbestmaster/se-core","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Fse-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Fse-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Fse-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Fse-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webbestmaster","download_url":"https://codeload.github.com/webbestmaster/se-core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241879234,"owners_count":20035748,"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-14T22:28:31.192Z","updated_at":"2026-06-05T12:31:29.811Z","avatar_url":"https://github.com/webbestmaster.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# se-core\nSelenium Web Driver Auto Test Core.\n\n## About\nPackage depends of 'canvas' (https://www.npmjs.com/package/canvas), so, you have to install canvas dependencies.\n\nYou can quickly install the dependencies by using the command for your OS:\n\nOS | Command\n----- | -----\nOS X | Using [Homebrew](https://brew.sh/):\u003cbr/\u003e`brew install pkg-config cairo pango libpng jpeg giflib`\u003cbr/\u003e\u003cbr/\u003eUsing [MacPorts](https://www.macports.org/):\u003cbr/\u003e`port install pkgconfig cairo pango libpng jpeg giflib`\nUbuntu | `sudo apt-get install libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev build-essential g++`\nFedora | `sudo yum install cairo cairo-devel cairomm-devel libjpeg-turbo-devel pango pango-devel pangomm pangomm-devel giflib-devel`\nSolaris | `pkgin install cairo pango pkg-config xproto renderproto kbproto xextproto`\nWindows | [Instructions on our wiki](https://github.com/Automattic/node-canvas/wiki/Installation---Windows)\n\n**Mac OS X v10.11+:** If you have recently updated to Mac OS X v10.11+ and are experiencing trouble when compiling, run the following command: `xcode-select --install`. Read more about the problem [on Stack Overflow](http://stackoverflow.com/a/32929012/148072).\n\n## Example\n```javascript\n/* global describe, it, before, after, beforeEach, afterEach, process */\n\n// !!! use process.env for example only\n// SE_SERVER_PORT, IS_MOBILE and BROWSER_NAME needed for selenium server\nprocess.env.SE_SERVER_PORT = 4444;\nprocess.env.IS_MOBILE = '';\nprocess.env.BROWSER_NAME = 'chrome';\n\nconst {assert} = require('chai');\nconst WebDriver = require('selenium-webdriver');\nconst addContext = require('mochawesome/addContext');\nconst {SeleniumServer} = require('selenium-webdriver/remote');\nconst {seUtil, testUtil} = require('se-core');\n\nconst {mainConfig} = require('./../test-config/main-config.js');\nconst envData = testUtil.getEnvData();\nconst server = new SeleniumServer(...testUtil.getSeleniumServerArgs());\nconst until = WebDriver.until;\nconst byCss = WebDriver.By.css;\nlet driver = null;\n\nconst selector = {\n    iFrame: 'iframe-css-selector',\n    loader: 'loader-css-selector'\n};\n\ndescribe('Load', () =\u003e {\n    if (!envData.isMobile) {\n        before(async () =\u003e server.start());\n    }\n\n    after(async () =\u003e server.stop());\n\n    beforeEach(async () =\u003e {\n        driver = new WebDriver\n            .Builder()\n            .usingServer(envData.wdServerUrl)\n            .withCapabilities(testUtil.getCapabilities())\n            .build();\n\n        if (!envData.isMobile) {\n            await seUtil.screen.setSize(driver, 1024, 768);\n        }\n    });\n\n    afterEach(async () =\u003e driver.quit());\n\n\n    it('Load iFrame', async function loadIFrame() {\n        await driver.get(mainConfig.url.host + mainConfig.url.pathname);\n\n        // wait to create loader\n        const loader = await driver.wait(until.elementLocated(byCss(selector.loader)), 5e3);\n\n        // wait to hide loader\n        await driver.wait(until.elementIsNotVisible(loader), 10e3);\n\n        // wait to create iFrame\n        const iFrame = await driver.wait(until.elementLocated(byCss(selector.iFrame)), 5e3);\n\n        // wait to show iFrame\n        await driver.wait(until.elementIsVisible(iFrame), 5e3);\n\n        const image = await seUtil.screen\n            .ofSelector(driver, selector.iFrame);\n\n        addContext(this, image); // eslint-disable-line no-invalid-this\n    }).timeout(30e3);\n\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebbestmaster%2Fse-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebbestmaster%2Fse-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebbestmaster%2Fse-core/lists"}