{"id":15732313,"url":"https://github.com/stopsopa/research-protractor","last_synced_at":"2025-06-24T00:34:21.150Z","repository":{"id":84269285,"uuid":"92187835","full_name":"stopsopa/research-protractor","owner":"stopsopa","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-01T23:43:19.000Z","size":55198,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T03:28:27.659Z","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/stopsopa.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-05-23T15:16:46.000Z","updated_at":"2023-09-01T23:43:26.000Z","dependencies_parsed_at":"2024-10-25T02:53:05.285Z","dependency_job_id":null,"html_url":"https://github.com/stopsopa/research-protractor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stopsopa/research-protractor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stopsopa%2Fresearch-protractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stopsopa%2Fresearch-protractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stopsopa%2Fresearch-protractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stopsopa%2Fresearch-protractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stopsopa","download_url":"https://codeload.github.com/stopsopa/research-protractor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stopsopa%2Fresearch-protractor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261583160,"owners_count":23180639,"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-10-04T00:08:56.462Z","updated_at":"2025-06-24T00:34:21.127Z","avatar_url":"https://github.com/stopsopa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# DEPRECATED\nCreated in 2017 - quite old now and not maintained.\n\nIt was wild ride failed experiment in attempt to find reliable end to end testing library which could be run from Docker in CI/CI without paying obscene fees to SAS providers (mainly SouceLabs or Browserify at that time).\n\nExperiment was failed because none of tested E2E libraries were stable in dockerized environment - wchich was a schame.\n\nToday you can just use playwright which run in Docker perfectly - at lest that's current state of art (Sep 2023).\n\nTable of contents\n=================\n\n  * [Overview](#overview)\n  * [Building HUB](#building-hub)\n  * [Setup Mac (host) node and configure browsers](#setup-mac-host-node-and-configure-browsers)\n  * [Creating and configuring virtual machine with Windows](#creating-and-configuring-virtual-machine-with-windows)\n  * [Launch at startup Windows](#launch-at-startup-windows)\n    * [Microsoft Edge configuration](#microsoft-edge-configuration)\n  * [Launch at startup Mac](#launch-at-startup-mac)\n  * [Wakeup screen for safari](#wakeup-screen-for-safari)\n  * [Cli](#cli)\n  * [VNC access](#vnc-access)\n  * [Usefull links](#usefull-links)\n  * [Known issues](#known-issues)\n  * [Further research]\n\n# Overview\n\nTo prepare selenium server first is good to understand what and how we want to achieve.\n\nThe general schema is:\n![schema](https://stopsopa.github.io/research-protractor/img/schema.png)\n\nend result (visual):\n![schema](https://stopsopa.github.io/research-protractor/img/desktop.jpg)\n\n\nOn schema we can see that two selenium nodes (one on host mac and another form windows on virtual machine) gonna register themselvs to hub. From now on hub will spread instructions betwen two nodes and will be able to control browsers automatically. \nSelenium nodes use different webdrivers to communicate with different browsers.\nAdditionally because MAC machine is behind NAT we gonna build two tunnels from it to server to provide communication channel from server (hub) to MAC and to Windows (nodes) in VM.\n\nAt the end it would be nice to configure MAC machine and VM with Windows to automatically register nodes to hub after starting machine.\n\nFor this tutorial lets make one assumption:\n\nOur server will have public ip 123.234.123.234\n\n# Building HUB:\n\nWGET selenium jar file (currently [3.5.2](http://www.seleniumhq.org/download/))\n\nThen download [hub.sh](https://github.com/stopsopa/research-protractor/blob/master/server/hub.sh) to the same directory and run:\n\n    /bin/bash hub.sh \n    \nIf you need to stop/kill hub:\n    \n    /bin/bash hub.sh stop\n    \nThen you can check if hub is up and running:\n\n    http://123.234.123.234:4444/grid/console\n    \n   \n# Setup Mac (host) node and configure browsers   \n  \nMake sure that you have installed:\n\n- VirtualBox Guest Additions\n- [git](https://git-scm.com/) \n- [java](https://java.com/en/download/manual.jsp) \n- [chrome](https://www.google.com/chrome/browser/desktop/index.html)\n- [firefox](https://www.mozilla.org/en-GB/firefox/new/)\n- [VirtualBox](https://www.virtualbox.org/wiki/Downloads)\n- [Vagrant](https://www.vagrantup.com/downloads.html)\n   \nClone this git repository and change value of parameter **HOST** in this file to ip of your server for host.\n\n(before running this below commands, make sure that you have authorised ssh key in under path **../ssh/id_rsa** to connect to server)\n\n(also check if [*Allow Remote Automation*](https://webkit.org/blog/6900/webdriver-support-in-safari-10/) in Safari is enabled)\n![Allow Remote Automation](https://stopsopa.github.io/research-protractor/img/safari-dev.jpg)\n\n    cd mac\n    /bin/bash start-selenium.sh \n\nthen check in the browser (on mac) status of node:\n\n    http://localhost:5560/grid/console\n    \nand check hub in browser (anywhere) ...\n\n    http://123.234.123.234:4444/grid/console\n    \n    \n... chrome, firefox and safari from host mac machine should be already registered with hub.\n    \n# Creating and configuring virtual machine with Windows\n    \nFirst we need to download one of Windows [images](https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/). In our case \"Microsoft Edge on Win10 (x64) Stable (15.15063)\"\n    \ngoogle: \"Test Microsoft Edge and versions of IE8 through IE11 using free virtual machines you download and manage locally.\"    \n    \nThen we can create Virtual machine using [Vagrantfile](https://github.com/stopsopa/research-protractor/blob/master/Vagrantfile)\n    \nNext install inside VM: \n\n- [ContextConsole Shell Extension](http://code.kliu.org/cmdopen/)\n- [git](https://git-scm.com/) \n- [java](https://java.com/en/download/manual.jsp) \n- [chrome](https://www.google.com/chrome/browser/desktop/index.html)\n- [firefox](https://www.mozilla.org/en-GB/firefox/new/)\n\nExecute two .reg files windows/feature_bfcache32.reg and windows/feature_bfcache64.reg\n\n\nClone this repository and go to *windows* directory in this repository and run:\n    \n(before running this below commands, make sure that you have authorised ssh key in under path *..\\ssh\\id_rsa.ppk* to connect to server)\n\nadditionally before running this setup ie 11 like it is described here:\nhttp://elgalu.github.io/2014/run-protractor-against-internet-explorer-vm/#step4\n\nimg copy because article is not new and there is risk that it can disappear:\ngoogle(Run Protractor Against Internet Explorer VM elgulu)\n\nFolow required configuration for IEDriver [https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver#required-configuration]\n\n![image copy of page](https://stopsopa.github.io/research-protractor/img/ie11-setup.jpg)\n\nsource for IEWebdriver : http://selenium-release.storage.googleapis.com/\nbetter use 32 bit version instead of 64 bit [issues](http://elgalu.github.io/2014/run-protractor-against-internet-explorer-vm/#step5)\n\n    cd windows\n    start.cmd 123.234.123.234\n\nthen check in the browser (on windows) status of node:\n\n    http://localhost:5560/grid/console\n    \nand check hub in browser (anywhere) ...\n\n    http://123.234.123.234:4444/grid/console\n    \n    \n... chrome, firefox, edge and IE 11 from host mac machine should be already registered with hub.\n\nAdditionally is good to disable putting display to sleep:\n\n\n![schema](https://stopsopa.github.io/research-protractor/img/power-settings.png)\n    \n# Launch at startup Windows\n    \n    explorer \"%USERPROFILE%\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\"\n    \nscripts to run at startup \n\n    windows/start-tunnel.cmd\n    windows/start-selenium.cmd\n    \n## Microsoft Edge configuration\n\n\n![edge configuration](https://stopsopa.github.io/research-protractor/img/edge.jpg)    \n    \n    \n# Launch at startup Mac\n    \nFollowing instructions from (https://www.davidbaumgold.com/tutorials/wine-mac/#making-a-dock-icon) compile app in **AppleScript Editor**\n\n    tell application \"Terminal\"\n        do script \"~/pathtoscript ~/.app/drive_c/Program\\\\ Files/start.sh\"\n    end tell\n    \nscripts to run at startup \n\n    /bin/bash mac/startup.sh\n    \n[start.sh](https://github.com/stopsopa/research-protractor/blob/master/mac/startup.sh)\n\n# Wakeup screen for safari\n\n![image copy of page](https://stopsopa.github.io/research-protractor/img/energy-saver.png)\n![image copy of page](https://stopsopa.github.io/research-protractor/img/screen-saver.png)\n\nIn start-selenium.sh is already implemented mechanizm to wakeup screen when cpu usage rise above 100% (change that if you need)\n\n# Cli\n        \n    node protractor.sh\n    node protractor.sh --specs ../test/ng.js\n    node protractor.sh --specs ../test/ng.js -b mc\n       # mac chrome\n    node protractor.sh --specs ../test/ng.js -b mcwewi\n       # mac chrome, windows edge, windows IE11\n       # more details look parameter \"flag\" under:\n       # https://github.com/stopsopa/research-protractor/blob/master/protractor/config.js#L22\n    npm run start\n    npm run stop\n    npm run status\n    \n# VNC access\n\ncheck https://github.com/stopsopa/research-protractor/blob/master/mac/vnc-tunnel.sh\n\nBefore running that you should enable screen sharing in mac\n![schema](https://stopsopa.github.io/research-protractor/img/vnc.jpg)\n        \n# Usefull links\n\nGeneral documentation\n\n- table of content: http://www.protractortest.org/#/toc\n- (Protractor API 5.1.2) http://www.protractortest.org/#/api \n- main config: https://github.com/angular/protractor/blob/5.1.2/lib/config.ts#L644\n\nother:\n\n- suites: http://www.protractortest.org/#/page-objects#configuring-test-suites\n\nExpectedConditions:\n\n- https://github.com/angular/protractor/blob/master/lib/expectedConditions.ts\n    \ntesting not angular:\n    \n- https://github.com/sakshisingla/Protractor-Non-Angular-Tests/wiki/Creating-test-scripts-using-Protractor-for-non-angular-application\n\n# Known issues\n\n- [slow clicking ie11](https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/5116)\n- [Safari - angular not found](https://github.com/angular/protractor/issues/3118)\n\n# Updating selenium and webdrivers\n\nknown issues:\n\n\n---\n\n\n\n    [11:20:06] E/runner - Unable to start a WebDriver session.\n    [11:20:06] E/launcher - Error: WebDriverError: Invalid timeout type specified: ms\n    \n    \nhttps://github.com/angular/protractor/issues/4445#issuecomment-323288177\n\nlooks like problem with unstable latest release of selenium.. wait for another update/fix :/\n\n\n---\n\n# Further research\n\n* http://www.webdriverjs.com/protractor-vs-webdriverio-vs-nightwatch/\n* https://github.com/nightwatchjs/nightwatch/\n* https://github.com/webdriverio/webdriverio/\n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstopsopa%2Fresearch-protractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstopsopa%2Fresearch-protractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstopsopa%2Fresearch-protractor/lists"}