Issue with Initializing library 'Browser' with no arguments failed

Hi,

I have already performed the following:

  1. Install node.js e.g. from Download | Node.js
  2. Update pip pip install -U pip to ensure latest version is used
  3. Install robotframework-browser from the commandline: pip install robotframework-browser
  4. Install the node dependencies: run rfbrowser init in your shell

I have followed the installation above of the browser lib. Get the next Error:

[ ERROR ] Error in file ‘C:**\tests*\Test*\Sprint\PLAYGROUND\PLAYGROUND.robot’ on line 2: Initializing library ‘Browser’ with no arguments failed: Couldn’t execute node. Please ensure you have node.js installed and in PATH. See https://nodejs.org/ for instructions. Original error is [WinError 2] Het systeem kan het opgegeven bestand niet vinden
Traceback (most recent call last):
File “C:\Users*\AppData\Local\Programs\Python\Python39\lib\site-packages\Browser\browser.py", line 718, in init
self.playwright = Playwright(
File "C:\Users*
\AppData\Local\Programs\Python\Python39\lib\site-packages\Browser\playwright.py”, line 50, in init
self.ensure_node_dependencies()
File “C:\Users**\AppData\Local\Programs\Python\Python39\lib\site-packages\Browser\playwright.py”, line 65, in ensure_node_dependencies
raise RuntimeError(

Is there something I missed when installing?

As the error says, library can not find your NodeJs installation from the %PATH%. If you run node --version from command line you should also see an error.

I have already checked this, see below the vers. and the location.
image

Got it resolved. The PATH was not correct in the environment variables.

1 Like

@JoostW Can you share what PATH you used?

I went through the same 4 steps you posted. I just recently upgraded PyCharm to 2022.2 which unfortunately no longer supports Robot Framework Support plugin and had to switch to Robot Framework Language Server

I am getting the same error:
Unresolved library: Browser. Error generating libspec: Initializing library ‘Browser’ with no arguments failed: Couldn’t execute node. Please ensure you have node.js installed and in PATH. See https://nodejs.org/ for instructions. Original error is [Errno 2] No such file or directory: ‘node’

environment:
PyCharm 2022.2
node --version —> v16.9.1
robotframework 5.0.1
robotframework-browser 13.4.0
I am using a virtual environment which is the path I am using for Language Server Python

@marlonizag,

The PATH i used in the “Environmentvariables” setting is:

Environment:
Pycharm 2022.1.4
node vers: v16.13.1
robotframework: 5.0.1
robotframework-browser: 13.4.0