{"id":19829666,"url":"https://github.com/dyalog/selenium","last_synced_at":"2025-05-01T14:33:42.148Z","repository":{"id":81318669,"uuid":"44070061","full_name":"Dyalog/Selenium","owner":"Dyalog","description":"Create Test Scripts using Selenium WebDriver from Dyalog APL","archived":false,"fork":false,"pushed_at":"2024-08-12T14:50:29.000Z","size":130165,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-06T14:51:13.259Z","etag":null,"topics":["apl","dyalog","dyalog-apl","firefox","google-chrome","selenium","selenium-webdriver"],"latest_commit_sha":null,"homepage":null,"language":"APL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dyalog.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":"2015-10-11T21:15:47.000Z","updated_at":"2024-08-12T13:15:17.000Z","dependencies_parsed_at":"2024-06-04T11:47:33.244Z","dependency_job_id":"91bc3504-b51f-4dd2-81af-2c5ff92cd464","html_url":"https://github.com/Dyalog/Selenium","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dyalog%2FSelenium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dyalog%2FSelenium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dyalog%2FSelenium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dyalog%2FSelenium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dyalog","download_url":"https://codeload.github.com/Dyalog/Selenium/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251890359,"owners_count":21660503,"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":["apl","dyalog","dyalog-apl","firefox","google-chrome","selenium","selenium-webdriver"],"created_at":"2024-11-12T11:19:30.926Z","updated_at":"2025-05-01T14:33:41.675Z","avatar_url":"https://github.com/Dyalog.png","language":"APL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Selenium QA Tools for Dyalog APL\n\nThis folder contains code which allows Dyalog to automate browsers using [Selenium WebDriver](http://www.seleniumhq.org/)\nunder Microsoft Windows, using the Microsoft.Net bindings for Selenium.\n\nIt has been tested with Firefox and Google Chrome; drivers should also be available for Internet Explorer\nand other browsers.\n\n## Required DLLs\n\nDepending on the browser you are using, you  may need different drivers.\nWe have collected various versions of drivers for Chrome, Firefox end Edge\nwhich are available in the folder-layout documented here on the [Downloads](https://github.com/Dyalog/Selenium/releases/latest) page of this repository.\nIf you need to find other versions, the \"Browser\"-Section of the [Selenium Downloads-page](https://www.selenium.dev/downloads/) is a good starting-point.\n\n**Note that in recent versions of Microsoft Windows, you will need to \"Unblock\" them after downloading them, before Windows will allow you to use them.**\n\n### Folder-Layout\n\nThe following folder-structure has proven to be useful.\n\n````language=text\nDrivers--+--\u003eChrome81---+-\u003eLinux\n         |              +-\u003eMac\n         |              +-\u003eWin\n         +--\u003eChrome80...\n         +--\u003eWebDriver3\n         +--\u003eWebDriver4\n         +--\u003emore-------+----\u003enewtonsoft-120r3net47\n                        +----\u003enewtonsoft_120r3-netstandard2.0\n````\nNB: depending on your use of .Net, you may only need one of the two folders for (Newtonsoft)[https://www.newtonsoft.com/json]. Seleniums does not require a specific version of it (but needs at least ≥12.0 ) and the path (below DRIVER) is configureable in settings.json.\n\nWith Microsoft Egde, the structure gets another level of differentiation, as Egde has different drivers for Windows-32 and Windows-64:\n\n````language=text\nDrivers--+--\u003eEdge83----+-\u003eLinux\n                       +-\u003eMac\n                       +-\u003eWin\n                            +-\u003e32\n                            +-\u003e64\n````\n\nWhen looking for a driver, we will first look in the `Drivers`-folder that the corresponding entry in settings.json points to.\nIf we do not find the driver there, we'll look for a platform-specific subfolder and possibly look for the appropriate bits-folder.\nThe filename of the driver is by default composed using the `BROWSER`-Entry to the corresponding setting prefixed to the text \"Driver\". On Windows, the extension `.exe` is appended.\nYou will need to pick the appropriate driver for the browsers you're testing against. (With Chrome, for example, click `⁞` at the right edge of the URL-bar to open a menu with more\noptions, select \"Help\" and \"About Chrome\". If that version is not included, [download the file chromedriver.exe](https://chromedriver.chromium.org/downloads) and\nput it into a folder within that structure.)\n\n### M1 compatibility\n\nchromedriver is also available in a M1 edition. This is currently (18.2) not needed, as the Dyalog process\non M1 machines runs with Rosetta and can't access the M1 environment.(Don't misunderstand: it works fine on M1!)\n\n### Configuration (settings.json)\n\nThe file settings.json holds the configuration of drivers and spexcifies associated details such as location of required files. It has the following mandatory components:\n\n* a char-field \"**DLLPATH**\" which holds the path for the WebDriver to use. Currently WebDriver3 is 2yrs old while WebDriver4\n  is being developed, but still in alpha-stage. Which driver you use depends on whether you're using the .net Framework (WebDriver3)\n  or .NET Core (WebDriver4).\n  * **Newtonpath**: name of a subfolder (below DLLPATH= that has the DLLs for (Newtonsoft)[https://www.newtonsoft.com/json] (a dependency of Selenium)\n* a numeric field \"**PORT**\" defining the port that the browser uses to retrieve data\n* named configurations (settings of parameters) with these elements:\n  * **BROWSER**: the name of the brower\n  * **DRIVER**: specifies the path where the driver-files are stored.  If drivers are available for different platforms, create subdirectories named `Linux`, `Win` and/or `Mac`..\n  * [**PORT**]: while the first 2 settings are mandatory for a browser-configuration, this parameter\n    as well as the following ones are optional.\n  * [**Executable**]: we assume that the required driverfile is BROWSER (lowercace),\"driver\". If this does not apply\n      (the driver for Firefox is called geckodriver), this options enables you to specify the name directly (no extension!)\n  * [**OptionsInstanceOf**]: (*advanced stuff*) if present, can be used to create additional parameters that are\n    passed to the constructor of the browser-service that we're instiating.\n  * [**Options**]: when OptionsInstanceOf is used, this parameter is mandatory. It contains a JSON-description of an\n    array with one or more options of the specific driver. (See [this link](https://www.selenium.dev/selenium/docs/api/dotnet/html/T_OpenQA_Selenium_Chrome_ChromeOptions.htm) for an example of ChromeOptions)\n\nIn order to avoid the need of editing this file, we introduced environment variables (or .dcfg-params, ofc) that help\nto generalize the file content:\n\n* `SELENIUM_DRIVERPATH` - should point to the folder \"Drivers\" (including that folder itself)\n\n* `SELENIUM_DRIVER` - the name of ther driver you want to use (by default), i.e. `Chrome89` (for Dyalog 18.2)\n   You can ofc use any driver by not passsing a empty right argument to #.Selenium.InitBrowser)\n\n## Demos or Samples\n\n### DUI-Tests\n(The following assumes a folder-structure which has the [DUI-Repository](https://github.com/Dyalog/DUI) in /git. Adjust paths as neccessary.)\n\nStart one APL-Session, `)load /git/dui/DUI` and `Start'./MS3' 8080`\nStart another APL-Session, `)load /git/dui/DUI` and `[1] DUI.Test'./MS3'`. The syntax of Test is `[pause]DUI.Test site[page [browser]]`:  if the optional left argument `pause=1`, we will pause after a test has failed. `page` is the name of the specific page you want to test Chrome81 is the name of a config for most recent Chrome (at the time of writing this).\n\n### Plain tests\nTo write your own tests of website, you can ]LOAD Selenium.dyalog and then\n\n````\nSelenium.ApplySettings''  ⍝ get default-settings (recommended)\nb←Selenium.InitBrowser''  ⍝ instantiate configured browser\n````\n\n## More Documentation\n\nSee \"[Selenium from Dyalog.pdf](./Selenium%20from%20Dyalog.pdf)\" (docx source in the DocSrc folder).\n\n## Issues\n\n* occassionally the client may throw an error similar to the following one when creating a Selenium-Instance:\n\n```language=text\nCould not load webdriver.dll and webdriver.support.dll from c:/Selenium/Drivers/ChromeDriver79/ ─ they may be blocked (Properties\u003eGeneral\u003eUnblock)\n\nTest[..] Selenium.InitBrowser''\n         ∧\n```\n\n\"Unblocking\" as described may help (the first time). However, since other reasons may cause this problem as well, we also show exceptions (usually .net-Exceptions give clear indication of the problem, though they may be verbose at times...)\n\n* a smiliar issue may appear on MacOS\n\nOpen Terminal., navigate to the location of the driver you are using within the Drivers folder and execute the following:\n````\nExecute xattr -d com.apple.quarantine {NameOfDriver}\n````\n\nIt might be necessary to repeat this within the `more`folder as well as `WebDriver4`.\n\nAlso, open MacOS' settings page and have a look at \"Security \u0026 Privacy\" \u003e \"General\". That page may show a button\n\"Open anyway\" at the bottom of the page. Check if the driver is listed there and if so, enable it.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyalog%2Fselenium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdyalog%2Fselenium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyalog%2Fselenium/lists"}