Giter Club home page Giter Club logo

redhat-developer / vscode-extension-tester Goto Github PK

View Code? Open in Web Editor NEW
247.0 11.0 70.0 6.7 MB

ExTester: Your Essential UI Testing Companion for Visual Studio Code Extensions! Seamlessly execute UI tests with Selenium WebDriver, ensuring robustness and reliability in your extension development journey. Simplify UI testing for your VS Code extensions and elevate the quality of your user interface effortlessly.

License: Apache License 2.0

TypeScript 95.79% JavaScript 3.40% CSS 0.82%
extensions redhat selenium-webdriver testing ui ui-testing vscode

vscode-extension-tester's Introduction

ExTester for Visual Studio Code

ExTester ExTester Locators ExTester Page Objects License
Maximal supported version of VS Code Main CI Insider CI


UI Testing Framework for Visual Studio Code.

FeaturesRequirementsUsageDocumentationKnown Issues

ExTester: Your Essential UI Testing Companion for Visual Studio Code Extensions!
Seamlessly execute UI tests with Selenium WebDriver, ensuring robustness and reliability in your extension development journey. Simplify UI testing for your VS Code extensions and elevate the quality of your user interface effortlessly. Dive into efficient testing with ExTester today!


Features

  • ⭐ Download a test instance of Visual Studio Code.
  • ⭐ Download the appropriate version of ChromeDriver.
  • ⭐ Pack and Install your extension into downloaded VS Code instance.
  • ⭐ Launch the VS Code instance using Selenium WebDriver.
  • ⭐ Run your tests.

Requirements

NodeJS Visual Studio Code Operating System
18.x.x20.x.xLTSLatest
❓ Best-effort
min-max
1.89.x1.90.x1.91.x
LinuxWindowsmacOS
⚠️
⚠️ Known Issues

NodeJS Support Policy

ExTester is aiming same support for NodeJS releases as Visual Studio Code and Selenium have.

Usage

Simply install our package into your extension devDependencies to get started:

npm install --save-dev vscode-extension-tester@latest

Make sure to check out the 🔗 Documentation for detailed instructions.

Documentation

Our full documentation is located in 🔗 GitHub Wiki. Included are details about Page Objects API and how to setup Mocha tests information.

Issues

Something is not working properly? In that case, feel free to 🔗 open feature requests, report bugs, etc.

Get Involved

Contribution Welcomed

If you'd like to help us get better, we appreciate it! Check out our 🔗 Contribution Guide on how to do that.

Known Issues

We have prepared few answers for most common problems community reported. See 🔗 Known Issues

vscode-extension-tester's People

Contributors

apupier avatar datho7561 avatar davylandman avatar dcermak avatar dependabot[bot] avatar djelinek avatar ecksdy avatar ewanharris avatar fbricon avatar haberdashpi avatar infiniteregrets avatar j-windsor avatar jeffb-sfdc avatar jkopriva avatar jrichter1 avatar lordrip avatar mlorinc avatar odockal avatar outscale-mdr avatar pospisilf avatar slbstm avatar ssbarnea avatar tamitakamiya avatar txava avatar unsortedhashsets avatar yannickowow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-extension-tester's Issues

ViewSection expansion not working in latest VSCode 1.41.x

Cannot expand ViewSection and get tree item from ViewSection (under a Tree view)

Note: this error exists only in the latest VSCode (1.41.x). Older version (1.40.2) works fine

What I am doing:

const section = await new SideBarView().getContent().getSection(<section_name>);
await section.expand();
 if (await section.isExpanded()) {
      console.debug('Section expanded');
      const item = await section.findItem(<Item Name>);
      await item.click();
}

Here is the error:

NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":".panel-header"}
  (Session info: chrome=76.0.3809.146)
  (Driver info: chromedriver=76.0.3809.126 (d80a294506b4c9d18015e755cee48f953ddc3f2f-refs/branch-heads/3809@{#1024}),platform=Mac OS X 10.14.6 x86_64)
    at Object.checkLegacyResponse (/Users/lakshraj/IdeaProjects/dslink-cpp-normalization/vscode_extension/node_modules/selenium-webdriver/lib/error.js:546:15)
    at parseHttpResponse (/Users/lakshraj/IdeaProjects/dslink-cpp-normalization/vscode_extension/node_modules/selenium-webdriver/lib/http.js:509:13)
    at /Users/lakshraj/IdeaProjects/dslink-cpp-normalization/vscode_extension/node_modules/selenium-webdriver/lib/http.js:441:30
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
From: Task: WebElement.findElement(By(css selector, .panel-header))
    at Driver.schedule (/Users/lakshraj/IdeaProjects/dslink-cpp-normalization/vscode_extension/node_modules/selenium-webdriver/lib/webdriver.js:807:17)
    at CustomTreeSection.schedule_ (/Users/lakshraj/IdeaProjects/dslink-cpp-normalization/vscode_extension/node_modules/selenium-webdriver/lib/webdriver.js:2010:25)
    at CustomTreeSection.findElement (/Users/lakshraj/IdeaProjects/dslink-cpp-normalization/vscode_extension/node_modules/selenium-webdriver/lib/webdriver.js:2057:17)
    at CustomTreeSection.<anonymous> (/Users/lakshraj/IdeaProjects/dslink-cpp-normalization/vscode_extension/node_modules/vscode-extension-tester/out/webdriver/components/sidebar/ViewSection.js:103:39)
    at Generator.next (<anonymous>)
    at /Users/lakshraj/IdeaProjects/dslink-cpp-normalization/vscode_extension/node_modules/vscode-extension-tester/out/webdriver/components/sidebar/ViewSection.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/lakshraj/IdeaProjects/dslink-cpp-normalization/vscode_extension/node_modules/vscode-extension-tester/out/webdriver/components/sidebar/ViewSection.js:4:12)
    at CustomTreeSection.isHeaderHidden (/Users/lakshraj/IdeaProjects/dslink-cpp-normalization/vscode_extension/node_modules/vscode-extension-tester/out/webdriver/components/sidebar/ViewSection.js:102:16)
    at CustomTreeSection.<anonymous> (/Users/lakshraj/IdeaProjects/dslink-cpp-normalization/vscode_extension/node_modules/vscode-extension-tester/out/webdriver/components/sidebar/ViewSection.js:38:28)

Cannot launch VS Code App in Mac

First of all, thanks for developing this helper.

I am trying to integrate vscode-extension-tester into my application (in Mac). Here is the error while installing the my vsix file into the VSCode app.

Installing .vsix
/bin/sh: /tmp/.vscode_selenium_temp/Visual: No such file or directory
(node:70604) UnhandledPromiseRejectionWarning: Error: Command failed: ELECTRON_RUN_AS_NODE=1 /tmp/.vscode_selenium_temp/Visual Studio Code.app/Contents/MacOS/Electron /tmp/.vscode_selenium_temp/Visual Studio Code.app/Contents/Resources/app/out/cli.js --install-extension .vsix
at checkExecSyncError (child_process.js:621:11)
at Object.execSync (child_process.js:657:15)
at CodeUtil.installExtension (/vscode_extension/node_modules/vscode-extension-tester/out/util/codeUtil.js:113:23)
at ExTester.installVsix (/vscode_extension/node_modules/vscode-extension-tester/out/extester.js:88:26)
at ExTester. (/vscode_extension/node_modules/vscode-extension-tester/out/extester.js:115:18)
at Generator.next ()
at fulfilled (/vscode_extension/node_modules/vscode-extension-tester/out/extester.js:5:58)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:70604) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

Support packaging an extension with --yarn?

I am working on a vscode extension, that doesn't really work too well with npm and thus I'm using yarn instead. Unfortunately that means that running vsce package is broken and instead I must invoke it as vsce package --yarn. Would it be possible to add a flag/option to this function:

packageExtension(): void {

that it will invoke vsce package with --yarn if the user wishes to do so?

This should be relatively straight forward to pull of, so I can submit a pull request myself, if you'd accept it?

Provide test job on Insider build

it will allow to detect early compatibility issues. It is especially useful as VS Code upgrades are automatic by default so most VS Code extension are trying to test against latest available version (and it would be interesting for them to test also on insiders)

Add sample project

Please add sample project with basic project settings and basic test. Thank you!

Return an error code when the extension installation is failing

use case:

  • have an extension which requires version 1.x of VS COde
  • try to launch with specific code_version 1.y with x > y

currently, the installation of the extension is failing but the return code is 0. it leads CI to not detect the failure.

For instance:
https://travis-ci.org/github/camel-tooling/vscode-wsdl2rest/builds/674880592#L1198-L1214

Installing extensions...
Unable to install extension 'redhat.vscode-wsdl2rest' as it is not compatible with VS Code '1.43.2'.
Failed Installing Extensions: /home/travis/build/camel-tooling/vscode-wsdl2rest/vscode-wsdl2rest-0.0.12.vsix
(node:6294) UnhandledPromiseRejectionWarning: Error: Command failed: ELECTRON_RUN_AS_NODE=1 "/home/travis/build/camel-tooling/vscode-wsdl2rest/test-resources/VSCode-linux-x64/code" "/home/travis/build/camel-tooling/vscode-wsdl2rest/test-resources/VSCode-linux-x64/resources/app/out/cli.js" --install-extension "/home/travis/build/camel-tooling/vscode-wsdl2rest/vscode-wsdl2rest-0.0.12.vsix"
    at checkExecSyncError (child_process.js:630:11)
    at Object.execSync (child_process.js:666:15)
    at CodeUtil.installExtension (/home/travis/build/camel-tooling/vscode-wsdl2rest/node_modules/vscode-extension-tester/out/util/codeUtil.js:112:23)
    at ExTester.<anonymous> (/home/travis/build/camel-tooling/vscode-wsdl2rest/node_modules/vscode-extension-tester/out/extester.js:107:30)
    at Generator.next (<anonymous>)
    at /home/travis/build/camel-tooling/vscode-wsdl2rest/node_modules/vscode-extension-tester/out/extester.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/home/travis/build/camel-tooling/vscode-wsdl2rest/node_modules/vscode-extension-tester/out/extester.js:4:12)
    at ExTester.installVsix (/home/travis/build/camel-tooling/vscode-wsdl2rest/node_modules/vscode-extension-tester/out/extester.js:86:16)
    at ExTester.<anonymous> (/home/travis/build/camel-tooling/vscode-wsdl2rest/node_modules/vscode-extension-tester/out/extester.js:135:24)
(node:6294) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:6294) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
The command "npm run ui-test --silent" exited with 0.

Cannot open a folder containing subfolders with the Nautilus file explorer

(Oops, I was cleaning my keyboard and accidentally created this issue without it being ready)

When trying to open this folder:

folder/
    - subfolder/

with this code:

  await new Workbench().executeCommand('File: Open Folder...');
  const dialog: OpenDialog = await DialogHandler.getOpenDialog();
  await dialog.selectPath('/home/dakwon/Documents/testingfiles/folder');
  await dialog.confirm();

The correct folder does not open.

What happens instead is that when the folder path is entered in Nautillus:
image
There seems to be some sort of autocompletion happening, which ends up opening the subfolder instead.

I've looked into using the Extest: Open Folder command instead, but it doesn't seem to do what I need. What that command does is open a folder inside of a new untitled workspace:
image

instead of only opening a folder (and nothing else) like this:
image

Failure to install api-handler.vsix (Windows)

Hi!
I'm getting this error when trying to execute tests with the latest 2.5.1 version:

Downloading api-handler.vsix
(node:7652) UnhandledPromiseRejectionWarning: Error: Invalid URI "c:/Users/<user>/Work/vscode-tests/node_modules/vscode-extension-tester/resources/api-handler.vsix"
    at Request.init (C:\Users\<user>\Work\vscode-tests\node_modules\request\request.js:273:31)
    at new Request (C:\Users\<user>\Work\vscode-tests\node_modules\request\request.js:127:8)
    at request (C:\Users\<user>\Work\vscode-tests\node_modules\request\index.js:53:10)
    at Function.get (C:\Users\<user>\Work\vscode-tests\node_modules\request\index.js:61:12)
    at C:\Users\<user>\Work\vscode-tests\node_modules\vscode-extension-tester\out\util\codeUtil.js:128:25
    at new Promise (<anonymous>)
    at CodeUtil.<anonymous> (C:\Users\<user>\Work\vscode-tests\node_modules\vscode-extension-tester\out\util\codeUtil.js:127:19)
    at Generator.next (<anonymous>)
    at C:\Users\<user>\Work\vscode-tests\node_modules\vscode-extension-tester\out\util\codeUtil.js:8:71
    at new Promise (<anonymous>)

Obviously, it was introduced in the 2.5.1 version, with the URL support for VSIX file install.

Input.getText() and Input.clearText() not working on Mac

On macOS Mojave 10.14.6, the Input.getText() and Input.clearText() functions are not working.

The issue seems to be because await input.sendKeys(Key.chord(Input.ctlKey, 'a'), Key.chord(Input.ctlKey, 'c')); and await input.sendKeys(Key.chord(Input.ctlKey, 'a'), Key.BACK_SPACE); is not working on Mac.

This issue seems to be a problem with selenium and chrome, where sending command and another key doesn't work:
SeleniumHQ/selenium-google-code-issue-archive#5919

For Input.getText() how about doing this? :

return await this.findElement(Input.locators.Input.inputBox)
            .findElement(Input.locators.Input.input).getAttribute('value');

Using getAttribute('value') to get the value of the <input> is working for my Linux machine and macOS.

Input.clear() not working in special cases

In an input box, if the current text is highlighted by dragging the mouse cursor from left to right (and only left to right, this part is important), then Input.clear() does not work.

From the source code, it looks like Input.clear() is trying to select all text by doing Shift + Home, but if the whole text is already highlighted from left to right, Shift + Home will unhighlight everything instead.

From what I tried, Shift + Home does not highlight all text if the cursor isn't on the far right, if the right-most character isn't highlighted, or if text was highlighted from left to right.

For the time being, I could prevent this issue by sending Key.RIGHT until the cursor is all the way to the right, before calling Input.clear()

TypeError: Cannot read property 'driver' of undefined

Hi guys, I'm trying to play with the tester on my own project. But it ends with the error message "TypeError: Cannot read property 'driver' of undefined". Meanwhile the simple Hello World extensions works.

VS Code exists in local cache, skipping download
ChromeDriver 78.0.3904.105 exists in local cache, skipping download
This extension consists of 717 files, out of which 391 are JavaScript files. For performance reasons, you should bundle your extension: https://aka.ms/vscode-bundle-extension . You should also exclude unnecessary files by adding them to your .vscodeignore: https://aka.ms/vscode-vscodeignore
 DONE  Packaged: C:\gitroot\vscode-test\vscode-test-0.4.1.vsix (717 files, 9.02MB)
Installing extensions...
Extension 'vscode-test-0.4.1.vsix' was successfully installed.
Installing extensions...
Extension 'api-handler.vsix' was successfully installed.


Writing code settings to C:\gitroot\vscode-test\test-resources\settings\User\settings.json


DevTools listening on ws://127.0.0.1:9638/devtools/browser/17166905-b990-48d2-ac7a-f7b1c976b998
Warning: 'disable-background-networking' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'disable-client-side-phishing-detection' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'disable-default-apps' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'disable-hang-monitor' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'disable-popup-blocking' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'disable-prompt-on-repost' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'disable-sync' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'enable-automation' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'enable-blink-features' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'enable-logging' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'force-fieldtrials' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'ignore-certificate-errors' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'load-extension' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'log-level' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'first-run' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'sandbox' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'password-store' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'remote-debugging-port' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'test-type' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'use-mock-keychain' is not in the list of known options, but still passed to Electron/Chromium.
[main 2020-03-10T08:35:27.927Z] update#setState idle
(node:21856) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
(node:21856) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
(node:21856) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
(node:21856) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
[32192:29608:0310/163531.253:WARNING:appcenter_api.cc(116)] Instance ID : 8bfb442b-6489-429d-bb33-3f322476b4e4 User ID : 8bfb442b-6489-429d-bb33-3f322476b4e4 
Session ID : a5976491-6ef5-4c90-9a50-853bfa3674f8
[30140:0310/163532.095:INFO:CONSOLE(4133)] "Overwriting grammar scope name to file mapping for scope source.sql.
Old grammar file: file:///c%3A/gitroot/vscode-test/test-resources/VSCode-win32-x64-archive/resources/app/extensions/sql/syntaxes/sql.tmLanguage.json.
New grammar file: file:///c%3A/Users/test/.vscode/extensions/ms-mssql.mssql-1.9.0/syntaxes/SQL.plist", source: file:///C:/gitroot/vscode-test/test-resources/VSCode-win32-x64-archive/resources/app/out/vs/workbench/workbench.desktop.main.js (4133)
(node:5780) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
(node:5780) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
[30140:0310/163533.979:INFO:CONSOLE(3940)] "Extension Host", source: file:///C:/gitroot/vscode-test/test-resources/VSCode-win32-x64-archive/resources/app/out/vs/workbench/workbench.desktop.main.js (3940)
[30140:0310/163533.980:INFO:CONSOLE(3940)] "%c[vsonline][activate][verbose] Initializing authentication 
%c[vsonline][activate][verbose] Initializing self-hosted environment registry +8ms
  ", source: file:///C:/gitroot/vscode-test/test-resources/VSCode-win32-x64-archive/resources/app/out/vs/workbench/workbench.desktop.main.js (3940)
[30140:0310/163533.981:INFO:CONSOLE(3940)] "console.groupEnd", source: file:///C:/gitroot/vscode-test/test-resources/VSCode-win32-x64-archive/resources/app/out/vs/workbench/workbench.desktop.main.js (3940)
[30140:0310/163534.003:INFO:CONSOLE(258)] "%c[Extension Host] %c[vsonline][activate][info] Extension activating color: blue color:  [object Object] +146ms", source: file:///C:/gitroot/vscode-test/test-resources/VSCode-win32-x64-archive/resources/app/out/vs/workbench/workbench.desktop.main.js (258)
[30140:0310/163534.004:INFO:CONSOLE(258)] "%c[Extension Host] %c[vsonline][EnvironmentDetailsExplorer][info] Updating environment details color: blue color:  
+10ms", source: file:///C:/gitroot/vscode-test/test-resources/VSCode-win32-x64-archive/resources/app/out/vs/workbench/workbench.desktop.main.js (258)
  Hello World Example UI Tests
    1) "before all" hook

Shutting down the browser
Uninstalling vscode-extension-tester.api-handler...
Extension 'vscode-extension-tester.api-handler' was successfully uninstalled!

  0 passing (11s)
  1 failing

  1) Hello World Example UI Tests
       "before all" hook:
     TypeError: Cannot read property 'driver' of undefined
      at Context.before (test_out\test\e2e\ext.js:22:63)



npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] e2e-testing: `npm run pretest:client && npm run compile && .\node_modules\.bin\extest setup-and-run .\test_out\test\e2e\ext.js`     
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] e2e-testing script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\test\AppData\Roaming\npm-cache\_logs\2020-03-10T08_35_35_669Z-debug.log

"after all" hook errors out when uninstalling vscode-extension-tester.api-handler

I get the following error when the test suite was trying to uninstall the api-handler:

Shutting down the browser
Extension 'vscode-extension-tester.api-handler' is not installed.
Make sure you use the full extension ID, including the publisher, e.g.: ms-vscode.csharp
  1) "after all" hook

  1 passing (32s)
  1 failing

  1) "after all" hook:
     Error: Command failed: set ELECTRON_RUN_AS_NODE=1 && "<redacted>\VSCode-win32-x64-archive\Code.exe" "<redacted>\app\out\cli.js" --uninstall-extension "vscode-extension-tester.api-handler"

Also the command that I run is: extest run-tests *.js

Is it because the test suite closes the VSCode instance before trying to uninstall the api-handler?

On Mac: WebDriverError: unknown error: Chrome failed to start: exited abnormally

I am getting the following error when I try to run the helloworld-sample project's ui-tests on Mac 10.14.6

WebDriverError: unknown error: Chrome failed to start: exited abnormally
  (unknown error: unable to discover open pages)
  (The process started from chrome location /Users/davidkwon/Documents/Github_Repositories/vscode-extension-tester/sample-projects/helloworld-sample/test-resources/Visual Studio Code.app/Contents/MacOS/Electron is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
  (Driver info: chromedriver=76.0.3809.126 (d80a294506b4c9d18015e755cee48f953ddc3f2f-refs/branch-heads/3809@{#1024}),platform=Mac OS X 10.14.6 x86_64)

Here is the complete output: https://gist.github.com/xorye/5ac9a3c52ce68b5565ceee5381b2ae76

To reproduce this issue:
On Mac OS, clone this repository
cd vscode-extension-tester/sample-projects/helloworld-sample
npm install
npm run ui-test

On my machine, this error happens about 90 percent of the time. I tried running npm run ui-test around 20 times, it succeeded only twice.

I noticed that when running npm run ui-test, this process: (scroll sideways to see the full line)

UID   PID  PPID        F CPU PRI NI       SZ    RSS WCHAN     S             ADDR TTY           TIME CMD
501  4451  4449     6006   0   0  0        0      0 -      Z+                  0 ttys001    0:00.00 (Electron)

Exists for less than a second, and then dissappears on the next ps -l output.

Extensions view section 'findItem' is not working properly

VS Code extension is correctly filtered but 'findItem' method returns 'Uncaught NoSuchElementError: no such element: Unable to locate element' anyway. Please see attached img.

Environment

  • vscode-extension-tester 2.0.0
  • RHEL 8.0
  • VS Code 1.38.1

Extension Installed extensions view Language Support for Apache Camel extension is installed

Uncaught NoSuchElementError: no such element: Unable to locate element: {"method":"xpath","selector":".//div[contains(@class, 'monaco-list-row') and .//span/text()='vscode-apache-camel']"}
  (Session info: chrome=69.0.3497.128)
  (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.18.0-80.7.2.el8_0.x86_64 x86_64)
      at Object.checkLegacyResponse (node_modules/selenium-webdriver/lib/error.js:546:15)
      at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:509:13)
      at doSend.then.response (node_modules/selenium-webdriver/lib/http.js:441:30)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:189:7)
  From: Task: WebElement.findElement(By(xpath, .//div[contains(@class, 'monaco-list-row') and .//span/text()='vscode-apache-camel']))
      at Driver.schedule (node_modules/selenium-webdriver/lib/webdriver.js:807:17)
      at ExtensionsViewSection.schedule_ (node_modules/selenium-webdriver/lib/webdriver.js:2010:25)
      at ExtensionsViewSection.findElement (node_modules/selenium-webdriver/lib/webdriver.js:2057:17)
      at new AbstractElement (node_modules/vscode-extension-tester/out/webdriver/components/AbstractElement.js:42:48)
      at new ElementWithContexMenu (node_modules/vscode-extension-tester/out/webdriver/components/ElementWithContextMenu.js:18:1)
      at new ViewItem (node_modules/vscode-extension-tester/out/webdriver/components/sidebar/ViewItem.js:17:1)
      at new ExtensionsViewItem (node_modules/vscode-extension-tester/out/webdriver/components/sidebar/extensions/ExtensionsViewItem.js:19:9)
      at ExtensionsViewSection.<anonymous> (node_modules/vscode-extension-tester/out/webdriver/components/sidebar/extensions/ExtensionsViewSection.js:70:30)
      at Generator.next (<anonymous>)
      at fulfilled (node_modules/vscode-extension-tester/out/webdriver/components/sidebar/extensions/ExtensionsViewSection.js:5:58)

Workbench.executeCommand() appears to be broken with vscode 1.44.0

VSCode got an update 2 days ago and my integration tests suddenly started to fail with very obscure errors: commands no longer appear to get entered at all. My tests work fine with vscode 1.43, but in 1.44 Workbench.executeCommand() doesn't do a thing: the command prompt opens, but no text is entered.

Is this just me or did something in VSCode change?

[Wish] Support pre and post run hooks?

I have an extension that is unfortunately annoyingly hard to unit test (requires more mocking code than actual test code) and UI tests are imho the way to go. Unfortunately, I have absolutely no idea how to collect test coverage from UI tests, e.g. via nyc.

Is this even possible? If I understand this module correctly, then it launches a new instance of vscode and one would have to somehow hook into the launch to collect test coverage?

Support different keyboard layout

Depending on the keyboard layout of the user launching the test, different behavior occurs with keypress.
It would be better to find a keypress library taking care of the keyboard layout so that all users can launch tests locally.

Provide explantion to launch test

I think that currently there is no test for this project. it would be useful to have some test to check:

  • no regression with newer VS Code version
  • no regression when modifying code
  • to more easily check on several OS

`extest run-tests -o settings.json` not working as expected

When running extest run-tests -o settings.json, I am getting an error:
Error: Version settings.json is not available in stable stream

To replicate this issue:

  1. clone this repo
  2. cd sample-projects/helloworld-sample
  3. In package.json replace the ui-test script with: "npm run compile && extest setup-tests && extest run-tests -o settings.json out/ui-test/*.js"
  4. npm run ui-test

4 tests failing BottombarPanel and problesmView

on Fedora 30
I launched "npm run ui-test" from terminal so my own VS Code instance should not impact the tests (right?)

  1) BottomBarPanel
       can be toggled open:

      AssertionError: expected false to be true
      + expected - actual

      -false
      +true
      
      at /home/apupier/git/vscode-extension-tester/test/test-project/out/test/bottomBar/bottomBarPanel-test.js:24:52
      at Generator.next (<anonymous>)
      at fulfilled (out/test/bottomBar/bottomBarPanel-test.js:5:58)
      at process._tickCallback (internal/process/next_tick.js:68:7)

  2) BottomBarPanel
       can be toggled closed:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/apupier/git/vscode-extension-tester/test/test-project/out/test/bottomBar/bottomBarPanel-test.js)
  

  3) BottomBarPanel
       can be maximized and restored:

      AssertionError: expected 656 to equal 336
      + expected - actual

      -656
      +336
      
      at /home/apupier/git/vscode-extension-tester/test/test-project/out/test/bottomBar/bottomBarPanel-test.js:39:35
      at Generator.next (<anonymous>)
      at fulfilled (out/test/bottomBar/bottomBarPanel-test.js:5:58)
      at process._tickCallback (internal/process/next_tick.js:68:7)

  4) ProblemsView
       get warnings works:
     AssertionError: expected [ Array(2) ] to be empty
      at /home/apupier/git/vscode-extension-tester/test/test-project/out/test/bottomBar/problemsView-test.js:46:31
      at Generator.next (<anonymous>)
      at fulfilled (out/test/bottomBar/problemsView-test.js:5:58)
      at process._tickCallback (internal/process/next_tick.js:68:7)

Update Notification.dismiss locator

After 1.45.0 update, notification close button does not have codicon-close class.

New html structure of close button:

<li class="action-item" role="presentation">
    <a class="action-label codicon codicon-notifications-clear" role="button" tabindex="0" title="Clear Notification (Delete)"></a>
</li>

`Error: Cannot find module 'opencv4nodejs'` when running on RHEL node on Jenkins

[Pipeline] {
[Pipeline] sh
+ npm run ui-test

> [email protected] ui-test /mnt/hudson_workspace/workspace/vscode-openshift-build
> extest setup-and-run out/test/ui/*.test.js

/mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/opencv4nodejs-prebuilt/lib/cv.js:14
  throw err
  ^

Error: Cannot find module '/mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/opencv4nodejs-prebuilt/build/Release/opencv4nodejs'
Require stack:
- /mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/opencv4nodejs-prebuilt/lib/cv.js
- /mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/opencv4nodejs-prebuilt/lib/opencv4nodejs.js
- /mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/@nut-tree/nut-js/dist/lib/provider/opencv/image-writer.class.js
- /mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/@nut-tree/nut-js/dist/lib/adapter/vision.adapter.class.js
- /mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/@nut-tree/nut-js/dist/index.js
- /mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/vscode-extension-tester/out/webdriver/native/openDialog.js
- /mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/vscode-extension-tester/out/webdriver/native/dialogHandler.js
- /mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/vscode-extension-tester/out/extester.js
- /mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/vscode-extension-tester/out/cli.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
    at Function.Module._load (internal/modules/cjs/loader.js:686:27)
    at Module.require (internal/modules/cjs/loader.js:848:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/opencv4nodejs-prebuilt/lib/cv.js:11:8)
    at Module._compile (internal/modules/cjs/loader.js:955:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
    at Module.load (internal/modules/cjs/loader.js:811:32)
    at Function.Module._load (internal/modules/cjs/loader.js:723:14)
    at Module.require (internal/modules/cjs/loader.js:848:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/opencv4nodejs-prebuilt/lib/cv.js',
    '/mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/opencv4nodejs-prebuilt/lib/opencv4nodejs.js',
    '/mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/@nut-tree/nut-js/dist/lib/provider/opencv/image-writer.class.js',
    '/mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/@nut-tree/nut-js/dist/lib/adapter/vision.adapter.class.js',
    '/mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/@nut-tree/nut-js/dist/index.js',
    '/mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/vscode-extension-tester/out/webdriver/native/openDialog.js',
    '/mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/vscode-extension-tester/out/webdriver/native/dialogHandler.js',
    '/mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/vscode-extension-tester/out/extester.js',
    '/mnt/hudson_workspace/workspace/vscode-openshift-build/node_modules/vscode-extension-tester/out/cli.js'
  ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] ui-test: `extest setup-and-run out/test/ui/*.test.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] ui-test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/hudson/.npm/_logs/2020-03-13T19_44_59_967Z-debug.log

[Pipeline] }
Terminating xvnc.

helloworld-sample: WebDriverError: element not interactable

Hi, I am having trouble running the sample project's tests

After following the instructions in the sample project's readme, I ran npm run ui-test and I have a test failure:

 1) Hello World Command should show a notification with the correct text

Waiting for all webdriver tasks to finish
Shutting down the browser

  0 passing (6s)
  1 failing

  1) Hello World Example UI Tests
       Hello World Command should show a notification with the correct text:
     WebDriverError: element not interactable
  (Session info: chrome=76.0.3809.146)
  (Driver info: chromedriver=76.0.3809.126 (d80a294506b4c9d18015e755cee48f953ddc3f2f-refs/branch-heads/3809@{#1024}),platform=Linux 5.0.17-300.fc30.x86_64 x86_64)
      at Object.checkLegacyResponse (node_modules/selenium-webdriver/lib/error.js:546:15)
      at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:509:13)
      at /home/dakwon/git/vscode-extension-tester/sample-projects/helloworld-sample/node_modules/selenium-webdriver/lib/http.js:441:30
      at processTicksAndRejections (internal/process/task_queues.js:89:5)
  From: Task: WebElement.sendKeys()
      at Driver.schedule (node_modules/selenium-webdriver/lib/webdriver.js:807:17)
      at WebElement.schedule_ (node_modules/selenium-webdriver/lib/webdriver.js:2010:25)
      at WebElement.sendKeys (node_modules/selenium-webdriver/lib/webdriver.js:2174:19)
      at QuickOpenBox.<anonymous> (node_modules/vscode-extension-tester/out/webdriver/components/workbench/input/Input.js:39:25)
      at Generator.next (<anonymous>)
      at fulfilled (node_modules/vscode-extension-tester/out/webdriver/components/workbench/input/Input.js:5:58)
      at processTicksAndRejections (internal/process/task_queues.js:89:5)

The error seems to happen on this line:

await new Workbench().executeCommand('hello world');

Maybe I am doing something wrong?

OpenDialog doesn't work on mac

Hi,
Using vscode-extension-tester, I'm trying to do this 'workbench.executeCommand('Workspaces: Add Folder to Workspace...');' which opens a native dialog. I'm using
const dialog = await DialogHandler.getOpenDialog();
dialog.selectPath($WORKSPACE_PATH)
dialog.confirm();

This doesn't work and dialog stays open. Let me if this works in mac or any alternate approaches to open a folder/workspace in vscode. [I just need a way to add an empty folder to the vscode and from there i'm good testing my extension]

Remote debugging

It would be awesome if we could do remote debugging of the ui tests from within vscode. I'd like to be able to debug my application code while the tests are running.
Can you explore the possibility of using remote debugging and launching the tests from within vscode (via launch configurations) to allow us to achieve this?

Extension not being uninstalled after tests complete

Hi, I've noticed that when testing an extension, the extension is packaged and installed as a vsix. When the tests are finished, the extension remains installed.

Is there a built-in option I could set to uninstall the extension after the tests are finished?

.suggest-widget error with VS Code 1.44.0

 NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":".suggest-widget"}
  (Session info: chrome=78.0.3904.130)
  (Driver info: chromedriver=78.0.3904.105 (60e2d8774a8151efa6a00b1f358371b1e0e07ee2-refs/branch-heads/3904@{#877}),platform=Linux 4.15.0-1028-gcp x86_64)
      at Object.checkLegacyResponse (node_modules/selenium-webdriver/lib/error.js:546:15)
      at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:509:13)
      at doSend.then.response (node_modules/selenium-webdriver/lib/http.js:441:30)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:189:7)
  From: Task: WebElement.findElement(By(css selector, .suggest-widget))
      at Driver.schedule (node_modules/selenium-webdriver/lib/webdriver.js:807:17)
      at TextEditor.schedule_ (node_modules/selenium-webdriver/lib/webdriver.js:2010:25)
      at TextEditor.findElement (node_modules/selenium-webdriver/lib/webdriver.js:2057:17)
      at TextEditor.<anonymous> (node_modules/vscode-extension-tester/out/webdriver/components/editor/TextEditor.js:63:39)
      at Generator.next (<anonymous>)
      at fulfilled (node_modules/vscode-extension-tester/out/webdriver/components/editor/TextEditor.js:5:58)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:189:7)

see https://travis-ci.org/github/camel-tooling/camel-lsp-client-vscode/builds/673303559#L447-L466

the corresponding code to this error is here

https://github.com/camel-tooling/camel-lsp-client-vscode/blob/14080131f1af3bfd1b820d9dd63ac2e14259696f/src/ui-test/xml_completion_support_test.ts#L38-L50

Error: stdout maxBuffer length exceeded in mac

Hi,
When the ExTester downloads the vscode zip and unpacks it, an error is thrown.

UnhandledPromiseRejectionWarning: RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded.

I see in test-resources folder, the unpack process just waits till the size of Visual Studio Code is 199.2 MB every time i try to run the tests. [Actual size of VSCode 1.40 being 236MB]

Adding maxBuffer to '*/node_modules/vscode-extension-tester/out/util/unpack.js' file, line 22 will resolve this issue
child_process_1.exec(cd ${target} && unzip ${path.basename(input.toString())}, {maxBuffer: 1024 * 500}, (err) => {

If this is not intended, Let me know if there is any other setting i can change this to unpack the VSCode successfully

Notification message are no more found with VS Code 1.44.0

Notification.takeAction fails with NoSuchElementError:

I have some trouble with the takeAction function from the Notification class:

async takeAction(title: string): Promise<void> {

Instead of the action being taken, I get the following error:

     Uncaught NoSuchElementError: no such element: Unable to locate element: {"method":"xpath","selector":".//a[@role='button' and @title='Yes']"}
  (Session info: chrome=76.0.3809.146)
  (Driver info: chromedriver=76.0.3809.126 (d80a294506b4c9d18015e755cee48f953ddc3f2f-refs/branch-heads/3809@{#1024}),platform=Linux 5.6.0-1-default x86_64)
      at Object.checkLegacyResponse (node_modules/selenium-webdriver/lib/error.js:546:15)
      at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:509:13)
      at doSend.then.response (node_modules/selenium-webdriver/lib/http.js:441:30)
      at process._tickCallback (internal/process/next_tick.js:68:7)
  From: Task: WebElement.findElement(By(xpath, .//a[@role='button' and @title='Yes']))
      at Driver.schedule (node_modules/selenium-webdriver/lib/webdriver.js:807:17)
      at CenterNotification.schedule_ (node_modules/selenium-webdriver/lib/webdriver.js:2010:25)
      at CenterNotification.findElement (node_modules/selenium-webdriver/lib/webdriver.js:2057:17)
      at new AbstractElement (node_modules/vscode-extension-tester/out/webdriver/components/AbstractElement.js:42:48)
      at new NotificationButton (node_modules/vscode-extension-tester/out/webdriver/components/workbench/Notification.js:135:9)
      at CenterNotification.<anonymous> (node_modules/vscode-extension-tester/out/webdriver/components/workbench/Notification.js:95:36)
      at Generator.next (<anonymous>)
      at fulfilled (node_modules/vscode-extension-tester/out/webdriver/components/workbench/Notification.js:5:58)
      at process._tickCallback (internal/process/next_tick.js:68:7)

My test code looks roughly like this:

    const actions = await notification[0].getActions();
    expect(actions.map((act) => act.getTitle())).to.deep.equal(["Yes", "No"]);
    await notification[0].takeAction("Yes");

So the action with the label "Yes" should exist, nevertheless, I get the above error.

Input.getMessage() appears to enter text into the input thereby triggering the validateInput function

My extension creates at a certain point an InputBox which properties I am trying to verify via vscode-extension-tester. However I am having trouble using the getMessage() function as described in the Wiki: https://github.com/redhat-developer/vscode-extension-tester/wiki/Input#quick-input-message

It appears that the getMessage() focuses the inputBox and thereby triggers the validateInput function. In my case an empty input is unfortunately invalid, which immediately causes VSCode to display an error message in the input. getMessage() then returns this error message instead of the string passed via the prompt entry for showInputBox.

Methods 'findItem' and 'getVisibleItems' in ExtensionsViewSection return wrong results

Description

Methods findItem and getVisibleItems in ExtensionsViewSection are not working because of bad locator.

  1. findItem function always contains right title but wrong data which belongs to first extension in view.
  2. getVisibleItems returns list of extensions. Titles are right but other data such as description, author, etc belongs to first extension in view.

Potencial cause

Locator: .//div[contains(@class, 'monaco-list-row') and .//span/text()='${title}']

Locator should be looking for div which has monaco-list-row class, instead it finds monaco-list-rows and breaks methods which are based on monaco-list-row element.

Note

Please note, other locators might have similar issues.

Workbench executeCommand() not working right after reloading windows

I changed the helloworld-sample project tests so that the VS Code Reload Window command is being called in the middle:

    it('Hello World Command should show a notification with the correct text', async function () {
        this.timeout(8000);
        await new Workbench().executeCommand('hello world');
        let notification = await driver.wait(() => { return notificationExists('Hello'); }, 2000) as Notification;
        expect(await notification.getMessage()).equals('Hello World!');
        expect(await notification.getType()).equals(NotificationType.Info);

        await new Workbench().executeCommand('Reload Window');

        await new Workbench().executeCommand('hello world');
        notification = await driver.wait(() => { return notificationExists('Hello'); }, 2000) as Notification;
        expect(await notification.getMessage()).equals('Hello World!');
        expect(await notification.getType()).equals(NotificationType.Info);
    });

The await new Workbench().executeCommand('hello world'); call after reloading windows causes an error:

 1) Hello World Example UI Tests
       Hello World Command should show a notification with the correct text:
     Uncaught NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":".monaco-workbench"}
  (Session info: chrome=76.0.3809.146)
  (Driver info: chromedriver=76.0.3809.126 (d80a294506b4c9d18015e755cee48f953ddc3f2f-refs/branch-heads/3809@{#1024}),platform=Linux 5.4.18-1-MANJARO x86_64)
      at Object.checkLegacyResponse (node_modules/selenium-webdriver/lib/error.js:546:15)
      at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:509:13)
      at /home/x/Documents/work/vscode-extension-tester/sample-projects/helloworld-sample/node_modules/selenium-webdriver/lib/http.js:441:30
      at processTicksAndRejections (internal/process/task_queues.js:97:5)
  From: Task: WebDriver.findElement(By(css selector, .monaco-workbench))
      at Driver.schedule (node_modules/selenium-webdriver/lib/webdriver.js:807:17)
      at Driver.findElement (node_modules/selenium-webdriver/lib/webdriver.js:1014:17)
      at new AbstractElement (node_modules/vscode-extension-tester/out/webdriver/components/AbstractElement.js:36:43)
      at new Input (node_modules/vscode-extension-tester/out/webdriver/components/workbench/input/Input.js:18:1)
      at new QuickOpenBox (node_modules/vscode-extension-tester/out/webdriver/components/workbench/input/QuickOpenBox.js:19:9)
      at Function.<anonymous> (node_modules/vscode-extension-tester/out/webdriver/components/workbench/input/QuickOpenBox.js:28:20)
      at Generator.next (<anonymous>)
      at fulfilled (node_modules/vscode-extension-tester/out/webdriver/components/workbench/input/QuickOpenBox.js:5:58)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)
  From: Task: WebElement.findElement(By(css selector, .monaco-quick-open-widget))
      at Driver.schedule (node_modules/selenium-webdriver/lib/webdriver.js:807:17)
      at WebElementPromise.schedule_ (node_modules/selenium-webdriver/lib/webdriver.js:2010:25)
      at WebElementPromise.findElement (node_modules/selenium-webdriver/lib/webdriver.js:2057:17)
      at new AbstractElement (node_modules/vscode-extension-tester/out/webdriver/components/AbstractElement.js:42:48)
      at new Input (node_modules/vscode-extension-tester/out/webdriver/components/workbench/input/Input.js:18:1)
      at new QuickOpenBox (node_modules/vscode-extension-tester/out/webdriver/components/workbench/input/QuickOpenBox.js:19:9)
      at Function.<anonymous> (node_modules/vscode-extension-tester/out/webdriver/components/workbench/input/QuickOpenBox.js:28:20)
      at Generator.next (<anonymous>)
      at fulfilled (node_modules/vscode-extension-tester/out/webdriver/components/workbench/input/QuickOpenBox.js:5:58)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)

I think this may be because of some async call that isn't being caught, as explained here:
#42 (comment)?

Are there any workarounds for this, other than using setTimeout?

I've tried (await new Workbench().wait()).executeCommand('hello world'); and even:

await driver.wait(until.elementLocated(By.className('monaco-workbench')), 6000);

but no luck

Inconsistent test results for tests in test/test-project

Hi, after following the contributing guide for this project, I realized that not all tests in test/test-project pass. I also realized that depending on the OS and the VS Code version, the test results are different (ie, some cases that failed before, pass. some cases that pass before, fail)

For example, on Windows, when using the latest version of VS Code (1.40,0) and ChromeDriver (76.0.3809.126), I only have one (sometimes two) test(s) failing.

When using VS Code version (1.37.0) and ChromeDriver (2.38), more tests are failing.

Test results are also different on my linux machine as well. As of now, I am not sure why this happens.

I don't mean to sound condescending, I am just really excited about this project.

Error while clearing all Notifications - in version 1.45.0

This Error occurs while clearing notifications. This error is specific to VS Code version 1.45.0. It is working fine with v1.44.0

` NoSuchElementError: no such element: Unable to locate element: {"method":"css selector","selector":".codicon-clear-all"}

(Session info: chrome=78.0.3904.130)

(Driver info: chromedriver=78.0.3904.105 (60e2d8774a8151efa6a00b1f358371b1e0e07ee2-refs/branch-heads/3904@{#877}),platform=Linux 3.10.0-1062.12.1.el7.x86_64 x86_64)

  at Object.checkLegacyResponse (node_modules/selenium-webdriver/lib/error.js:546:15)

  at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:509:13)

  at /home/parstream-ci.gen/workspace/Edge_edge-components_PR-250/vscode_extension/node_modules/selenium-webdriver/lib/http.js:441:30

  at runMicrotasks (<anonymous>)

  at processTicksAndRejections (internal/process/task_queues.js:97:5)

From: Task: WebElement.findElement(By(css selector, .codicon-clear-all))

  at Driver.schedule (node_modules/selenium-webdriver/lib/webdriver.js:807:17)

  at NotificationsCenter.schedule_ (node_modules/selenium-webdriver/lib/webdriver.js:2010:25)

  at NotificationsCenter.findElement (node_modules/selenium-webdriver/lib/webdriver.js:2057:17)

  at NotificationsCenter.<anonymous> (node_modules/vscode-extension-tester/out/webdriver/components/workbench/NotificationsCenter.js:39:24)

  at Generator.next (<anonymous>)`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.