Jenkins as a Service on W10 in headless mode doesn't type characters for example "ą, ś, ł" into input

After couple of days trying to solve my problem I’ve decided to write here for help. I am using Selenium WebDriver and Type Script for my tests. On my local computer I am using Webstorm, but couple days ago I have installed Jenkins as a service on another machine with Windows 10 which I am connecting remotly (there is Visual Studio Code). Everything is set up fine - tests are working but problem is with input box and different characters, for example - polish, like “ą”, “ś” etc.

Here is more info:

  1. The test is working on my local computer with Webstorm perfectly.
  2. The same test is working perfectly when I run the test on this machine with Jenkins in VSC directly.
  3. Problem is when I am trying to start the test by Jenkins, I have read that when is installed as a service - default mode is headless, maybe that’s the problem.

Steps I have taken to fix this:

  1. I thought that this could be a problem with keyboard so I’ve change encoding in Jenkins on UTF-8, keyboard on machine with W10 and Jenkins is set up as polish programmer, browser language also polish.
  2. Some people had similar problems so I’ve tried to fix this with their suggestion but nothing worked.
  3. Every similar topic on stackoverflow I have read and also nothing worked, for example adding parameters like “–lang” and dozen of others.

It’s look like headless mode is messing with this because like I said earlier when I run the test directly on my local computer in WebStorm or on the machine in Visual Studio Code - works perfectly.

This is happening also in Chrome and Firefox, so it’s not a problem with browser.

Example:

await inputBox.setValue('Zarządzanie');

In WebStorm and Visual Studio Code there is ‘Zarządzanie’, but when the test is started by Jenkins there is ‘dzanie’.

Thanks for help!

are you coding remotely? or transfering your code via scm? If its scm like git you probably want to make sure .gitattributes is setup properly to have your file character encoding setup right.

I’m really not sure what jenkins has to do with this. Jenkins isn’t running your code. Jenkins is running node/javascript which is running your code. The typical way to install jenkins agent is in a local service account, but again I don’t know what settings would change how javascript interprets strings.

How are you confirming this? Is it possible its not outputting utf8 to the console log?

I am coding on my local computer and then pushing to git repository. Jenkins pulls repository from git always before starting the test to have the latest version.

It’s the output of the console log as “Received:” and the test fails. Like I’ve said before, the same test started in VSC or WebStorm directly passes.
UTF8 is set up correctly because on the beggining in the console log there was no polish characters at all and now they are but when it comes to put some characters into input - it fails.
And I didn’t mention that but I have for example “ą, ś, ó, ł, ę, ż, ź” etc. and some of them are typed correctly and some of them are not.

Have you solved the problem? How?